License check takes too long


#1

We have a major problem with Aspose products. The license check takes too long and it affects the startup of our server. In some cases, the license check can take two or three minutes. We have hundreds of libraries in our product. If every one of them did this, our server would take hours to start.


#2

Hi Jamie,


Thank you for contacting support. Please specify which Aspose libraries causing too long. We need to be more specific. It would be great if you can please provide us a sample application along with the environment details. We’ll check and reply you accordingly.


#3

Here is the source code for the license checks. Now, these methods can take up to five minutes on a powerful server. It is slowing down the start of our server dramatically. Please can Aspose to do something to fix this?!


public static void initAposeLicense() {
ClassLoader cl = Thread.currentThread().getContextClassLoader();

try (InputStream is = cl.getResourceAsStream(ASPOSE_LICENSE_FILENAME)) {
com.aspose.cells.License cellsLicense = new com.aspose.cells.License();
cellsLicense.setLicense(is);
} catch(Exception e) {
logger.error(“failed to license aspose cells:”+e.getMessage(),e);
}
try (InputStream is = cl.getResourceAsStream(ASPOSE_LICENSE_FILENAME)) {
com.aspose.words.License wordsLicense = new com.aspose.words.License();
wordsLicense.setLicense(is);
} catch(Exception e) {
logger.error(“failed to license aspose words:”+e.getMessage(),e);
}
try (InputStream is = cl.getResourceAsStream(ASPOSE_LICENSE_FILENAME)) {
com.aspose.pdf.License pdfLicense = new com.aspose.pdf.License();
pdfLicense.setLicense(is);
} catch(Exception e) {
logger.error(“failed to license aspose pdf:”+e.getMessage(),e);
}
try (InputStream is = cl.getResourceAsStream(ASPOSE_EMAIL_LICENSE_FILENAME)) {
com.aspose.email.License emailLicense = new com.aspose.email.License();
emailLicense.setLicense(is);
} catch(Exception e) {
logger.error(“failed to license aspose email:”+e.getMessage(),e);
}
try (InputStream is = cl.getResourceAsStream(ASPOSE_LICENSE_FILENAME)) {
com.aspose.slides.License slidesLicense = new com.aspose.slides.License();
slidesLicense.setLicense(is);
} catch(Exception e) {
logger.error(“failed to license aspose slides:”+e.getMessage(),e);
}
}


#4

Hi Jamie,


Thank you for posting the sample code. We have tested it and observed that it is taking 750 to 900 milliseconds on our side. Please share your Aspose library versions and also provide us your system environment details e.g.

  • Operating System name, edition and 32 & 64 bit (e.g. Windows 7 Ultimate 64 bit)
  • Eclipse version, edition and other details?
  • Local language and settings etc?
  • JDK version of your application project?
  • Any other information that you think is necessary.

It’ll help us to be more specific. We’ll take a closer look and reply you accordingly.


#5

We are customer for Aspose as well and we are having exact similar issue. Please update this topic with the resolution notes or the root cause.


#6

@sabirpatel,
Could you please provide the details of products which you are using? It will help us to provide appropriate reply for the concerned products only.