why cpu utilization increase as we load more images in thumbnail image previewer ?
-
In my application as we show more than 7 GB image's thumbnail cpu utilization become
100 percentage. i used thread inside that thread i load this image previewer at 100 ms using timer. i want reason and its solution. -
As already suggested in one of your other threads, do not try to load each and every thumbnails at the same time. Use a cache to contain the number of visible images and update the cache content when the user scroll but it does not make sense to try to load a gazillion images in any case.
-
Hi,
@Qt-embedded-developer said in why cpu utilization increase as we load more images in thumbnail image previewer ?:
i want reason and its solution.
Do a performance analysis of your code and fix the hot spots.
-
As a WAG, are you stressing the virtual memory manager. How much memory in the system? What is the swap doing? is it an 8GB RAM system?
Second WAG would be, is each image being treated as a separate distinct qobject derived component? That could drive the event loop nuts.
-
@Kent-Dorfman i found that i have total 1002 MB ram, used ram 287 MB , free ram which is increasing continuously while loading continuous image is 485 MB , buffer/cache 228 MB , availbale ram is 694 MB .
the actual problem is i used thread which is using 100 % CPU core when loading image Continuously in loop
-
re - load loop: that would do it. LOL
Wow...only 10megabytes of ram? Please use big B little b correctly when you abbreviate. or better yet, fight that urge to abbreviate. I'm stuck with using low quality SD cards (that WILL FAIL) on a project because someone in the planning phase misread bits vs bytes and assumed they were being given 32Gbytes of radation hardenned flash storage.
-
@Qt-embedded-developer said in why cpu utilization increase as we load more images in thumbnail image previewer ?:
In my application as we show more than 7 GB image's thumbnail
At a single point of time how many images loaded as thumbnail?
How many images you are viewing on the screen? -
@Kent-Dorfman i have edited my reply
-
As already suggested in one of your other threads, do not try to load each and every thumbnails at the same time. Use a cache to contain the number of visible images and update the cache content when the user scroll but it does not make sense to try to load a gazillion images in any case.
-
QPixmapCache can be a good start.