in reply to Re^2: Using Tk::TableMatrix for gallery image manipulation?
in thread Using Tk::TableMatrix for gallery image manipulation?

Didn't know that base64 encoding images speeded up image loading

Well you are misinterpreting what is happening. The base64encoding only is helping in an indirect way, and really is a Tk-only thing. Tk has a particular ideosyncrancy, that it wants it's images to be base64encoded (the reason is probably buried deep down in the c code). When you load a Photo object from -file, it does the base64encoding automatically. When loading a Photo object from -data, you must provide the encoding yourself.

So, in this particular instance, we can save the thumbnails as encoded images in one big file. That gives us 2 speed bonuses. The first is that we are saving the time it takes for Tk to base64encode the files, and the second, is that the system only has to open 1 file, the 'notebook.db', instead of 100 smaller thumbnail files. Disk I/O is the biggest slowdown in most programs.

As far as freezing the Photo object itself, you are in virgin territory. Many attempts have been made by people smarter than me, and they have given up because of all the complexities.


I'm not really a human, but I play one on earth. flash japh
  • Comment on Re^3: Using Tk::TableMatrix for gallery image manipulation?