Hello,I'm encountering some strange problems.
I made some report templates by Designer and render them by report&viewer.js.The templates may contain around dozens of pictures.In some of them,It works well,however,some of them render very slow.
I compared them carefully and found there exists different fuction call stack.I can't understand.
For the normal template,the function call as below.
I think these can indicate the correct render process.In the image tab of chrome inspect,the "convertAllImages" function call stack only called once or times equal to the number of pictures of first page.
And abnormal template shown as below.
I wonder how the reason can cause the difference.
My sincerely.
Thank you.
Question about load images
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Question about load images
Hello,
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Please send us a sample project that reproduces the issue for analysis.
Thank you.
Re: Question about load images
Hello,here's the report template and data source.
https://webcc-pro.obs.cn-east-3.myhuawe ... 281%29.mrt
https://webcc-pro.obs.cn-east-3.myhuawe ... /data.json
Please try it with report.js.
Thank you.
https://webcc-pro.obs.cn-east-3.myhuawe ... 281%29.mrt
https://webcc-pro.obs.cn-east-3.myhuawe ... /data.json
Please try it with report.js.
Thank you.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Question about load images
Hello,
Thank you for the sample. We need some additional time to investigate the issue, we will let you know about the result.
Thank you.
Thank you for the sample. We need some additional time to investigate the issue, we will let you know about the result.
Thank you.
-
- Posts: 6271
- Joined: Tue Mar 20, 2018 5:34 am
Re: Question about load images
Hello,
The convertAllImages function is called before each export to convert images to the desired format, e.g. pdf requires jpg.
Since viewer is basically an export to html, convertAllImages was also called, but after version 2023.2.3, when viewing a template in viewer, the convertAllImages call was removed (if you export to html, convertAllImages will still be called, since there is a choice of picture formats).
As for the long loading time, the given example contains 6MB of images and if you set the Continuous mode
the rendering will be as long. Images are loaded to get their width and height.
If you call export after all the images are loaded, the browser will give these images from the cache and there will be no re-loading.
Thank you.
The convertAllImages function is called before each export to convert images to the desired format, e.g. pdf requires jpg.
Since viewer is basically an export to html, convertAllImages was also called, but after version 2023.2.3, when viewing a template in viewer, the convertAllImages call was removed (if you export to html, convertAllImages will still be called, since there is a choice of picture formats).
As for the long loading time, the given example contains 6MB of images and if you set the Continuous mode
the rendering will be as long. Images are loaded to get their width and height.
If you call export after all the images are loaded, the browser will give these images from the cache and there will be no re-loading.
Thank you.