jvThumbview vs jvImagesviewer scroll repaint lazarus / 21-General ---------------------------------------------------------------------- DiduTech · 2023-11-11 00:49 Dropping both components jvThumbview and jvImagesviewer on a form to compare performance. When scrolling both containers with same number of images loaded, the jvImagesviewer scrolling is slow to repaint.  The jvThumbview is faster and more natural.  The jvimageviewer does load images quicker, but for my need the smoother scrolling is more appealing. What would cause the repainting to be so much slower?  I have tried various settings and no change in performance. There must be a difference in the painting method. Thank you. ---------------------------------------------------------------------- wp · 2023-11-11 11:22 I don't know whether it's worth the effort to dig into the sources of these components. I had ported them from the JVCL Delphi version because I wanted to see how they work, but did not make any further attempts to improve them. One problem seems to be that they load the entire full-size image, and this makes loading a pain, and easily overflows memory: The JVCL sample projects crash with a heap overflow error when trying to load a folder with 51 moderately sized images of 3 Mega pixels. Theo's ThumbViewer (https://github.com/theo222/lazarus-thumbviewer), on the other hand, is much improved. It uses multiple threads to load the images and has a special jpeg reader which scales the images to one half, quarter or eightth during loading. As a consequence the mentioned 51 images are loaded almost instantly, and - most of all - without crashing the 32-bit application. Because of the threaded loading, images do not appear simultaneously but are delayed by a short time. One thing that I don't like is the hard-coded "slide frame" bitmap for the thumbnails, well, at least it can be turned off. I am attaching a small demo for this viewer; it contains all the files from theo's github repository and the thumbviewer is created at runtime so that there is no need to install anything. ---------------------------------------------------------------------- DiduTech · 2023-11-11 15:33 Thank you. I did try thoe's thumbviewer after reading another post.   There are aesthetic things about the JV components that are more appealing.  The JV's  background is easily set by the properties.   For some reason even if I set color property of Theo's in the object inspector it stays white. Not functional, just visual.  The JV's have other functionality that has been easier for me to deal with.  I dropped the theo's, JVThumbview and JVImageviewer on a form and I can get the JV controls to do what I want.  Right off. They seem to fit my needs better. The JVThumbviewer once it is loaded with images does have better repainting and has quicker response than the JVImageviewer overall. I'm sure I just need to fight thru more with the Theo's Thumbviewer to get it to work for me.  I'm not a programmer and still learning.  I find myself fighting a lot of things and moving forward very slow. I enjoy it and like reading through the forum to get other ideas. I appreciate the help.  If I eventually find out more, I may add to this post.