Build: Prince 11.3
Environment: Windows 10 (10.0.15063 Build 15063)
Description:
I've encountered a case where I'm seeing >1000ms times to calculate the fontsize when calling window.getComputedStyle(elem).fontSize. Most files only take ~2ms to ~6ms, so this is a large outlier.
Chrome, Firefox and Edge all take significantly less time to perform the calculation on this file, so I was hoping someone could take a look under the hood and see if there's something going on. We have a batch of files taking over 3.5 hours to convert most content takes minutes at most.
Steps To Reproduce (example files and .bat to run attached below):
Although I doubt it's the cause of this performance issue, it looks like Prince is reloading the CSS files everytime the DOM reflows. This could possibly be cached since it's not possible for external files to change?
Environment: Windows 10 (10.0.15063 Build 15063)
Description:
I've encountered a case where I'm seeing >1000ms times to calculate the fontsize when calling window.getComputedStyle(elem).fontSize. Most files only take ~2ms to ~6ms, so this is a large outlier.
Chrome, Firefox and Edge all take significantly less time to perform the calculation on this file, so I was hoping someone could take a look under the hood and see if there's something going on. We have a batch of files taking over 3.5 hours to convert most content takes minutes at most.
Steps To Reproduce (example files and .bat to run attached below):
- Unzip the archive
- Make sure you're currently within the extracted folder and run convert.bat. Output is set to "verbose" and logging is included so you should see the number of times PrinceXML is reloading the CSS/fonts
- Open /text/input_js_embeded.xhtml in a browser of your choice, open developer tools and check the console output. You can then compare the times taken to perform each action.
Although I doubt it's the cause of this performance issue, it looks like Prince is reloading the CSS files everytime the DOM reflows. This could possibly be cached since it's not possible for external files to change?