Images from resource lib keep loading

Developer discussion regarding MapTool 1.4

Moderators: dorpond, trevor, Azhrei

Forum rules
Posting now open to all registered forum users.
User avatar
dmmelkor
Giant
Posts: 104
Joined: Wed Sep 06, 2006 2:42 pm
Location: Netherlands
Contact:

Images from resource lib keep loading

Post by dmmelkor »

Using 1.4.1.7 on win 7 java 64. Launcher settings: 2048 64 4

1.4.1.7 keeps loading all the images (? icon => img thumbnail) after i switch to another library. I.e. i use some images from my Furniture lib/dir and then switch to Wepaons, all thumnails need to reload again. Again when i switch back to Furniture. When i drag a ? (placeholder) the item appears normally on the map.
It looks to me the thumbnails are not permanently stored..? I've disabled Norton, but that did not help.
I do not have this problem with 1.4.0.5.

Any tips?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Images from resource lib keep loading

Post by aliasmask »

It's a feature and not a bug. I also don't like it. I liked it when it was cached, but it was cleared to fix a bug, which actually didn't fix it. *sigh*

User avatar
dmmelkor
Giant
Posts: 104
Joined: Wed Sep 06, 2006 2:42 pm
Location: Netherlands
Contact:

Re: Images from resource lib keep loading

Post by dmmelkor »

aliasmask wrote:It's a feature and not a bug.
Oh no, that can't be true... Thats a 100% showstopper for me. It takes minutes to load for me when i switch and i switch alot since i have alot of libs with each alot of images. That would mean no more future upgrades for me... argh.

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Images from resource lib keep loading

Post by aliasmask »

dmmelkor wrote:
aliasmask wrote:It's a feature and not a bug.
Oh no, that can't be true... Thats a 100% showstopper for me. It takes minutes to load for me when i switch and i switch alot since i have alot of libs with each alot of images. That would mean no more future upgrades for me... argh.
I just use Windows Explorer and drag and drop from there. Searching is easier there as well.

User avatar
dmmelkor
Giant
Posts: 104
Joined: Wed Sep 06, 2006 2:42 pm
Location: Netherlands
Contact:

Re: Images from resource lib keep loading

Post by dmmelkor »

Aha, did not know that :oops: Will try.
Love MT by the way, running it on a 27' monitor with mini's for my kids campaign. Using Realm Works for campaign info. Great combi.

User avatar
dmmelkor
Giant
Posts: 104
Joined: Wed Sep 06, 2006 2:42 pm
Location: Netherlands
Contact:

Re: Images from resource lib keep loading

Post by dmmelkor »

dmmelkor wrote:Aha, did not know that :oops: Will try.
Love MT by the way, running it on a 27' monitor with mini's for my kids campaign. Using Realm Works for campaign info. Great combi.
It works for dragging objects on the map, no problem there, BUT i cannot get it to work when using Drawing Tools. There I still need to select from the libraries. I have 15+ floor tile libraries with lots of tiles in them. Is there a workaround that i missed for selecting those?

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Images from resource lib keep loading

Post by aliasmask »

Yeah, that's a pain, but you can select a random tile before the thumb loads to see it right away in preview.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Images from resource lib keep loading

Post by JamzTheMan »

So, what happens is, when you select a library location, MT scans that file location for a list of files (eg images). It then searches the thumbnail cache (under .maptool), if a cached thumbnail exists, it uses this, if not it creates a new one on the fly. If the thumbnail is smaller in size than the original, it caches the thumbnail. (so if you have a bunch of 25x25 images, it's not going cache those).

I'm seeing that if the "cache" gets very large, it takes longer and longer to search that cache for images. If you clear this cache it restores the speed. I may need to look into if cache is even worth it, or add an option to only cache files > x mb, or auto clear cache images older than 1-2 days...

You can do it manually by double clicking the thumbtack area.
capture.jpg
capture.jpg (8.99 KiB) Viewed 1381 times
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Images from resource lib keep loading

Post by aliasmask »

JamzTheMan wrote:So, what happens is, when you select a library location, MT scans that file location for a list of files (eg images). It then searches the thumbnail cache (under .maptool), if a cached thumbnail exists, it uses this, if not it creates a new one on the fly. If the thumbnail is smaller in size than the original, it caches the thumbnail. (so if you have a bunch of 25x25 images, it's not going cache those).

I'm seeing that if the "cache" gets very large, it takes longer and longer to search that cache for images. If you clear this cache it restores the speed. I may need to look into if cache is even worth it, or add an option to only cache files > x mb, or auto clear cache images older than 1-2 days...

You can do it manually by double clicking the thumbtack area.
capture.jpg
There was a change and I think it worked better before.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Images from resource lib keep loading

Post by JamzTheMan »

The change was the size of the thumbnails from 50x50 to 500x500 to allow for increased zoom-ability.

Granted, the generation of thumbnails used to be more "expensive" of a computation a decade ago, a cache of the thumbnails was a good choice. I think it may be unnecessary now and since there is a direct correlation with the size of the thumbnail cache to the display of said thumbnails, i think that is the problem area to resolve. Of course, I could roll back the thumbnail size and keep the small 50x50 sizes which can almost be pointless to view on a HDPI monitor.


Given there is a workaround, I put this as a lower priority to resolve. Mostly because, if we can live with it as is for now, it will get an overhaul with JavaFX as there will be an internal overhaul of how images are handled most likely, moving to newer image classes and UI components.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
aliasmask
RPTools Team
Posts: 9024
Joined: Tue Nov 10, 2009 6:11 pm
Location: Bay Area

Re: Images from resource lib keep loading

Post by aliasmask »

JamzTheMan wrote:Of course, I could roll back the thumbnail size and keep the small 50x50 sizes which can almost be pointless to view on a HDPI monitor.
Yeah, but at this point all you see is big red question marks. I also think 500x500 may be overkill. Perhaps 200x200 and an option to use 50x50.

I would say, I do like the slide bar (just noticed it) to adjust the frame zoom.

User avatar
dmmelkor
Giant
Posts: 104
Joined: Wed Sep 06, 2006 2:42 pm
Location: Netherlands
Contact:

Re: Images from resource lib keep loading

Post by dmmelkor »

Jamz, by workaround do you mean using Explorer? As i said before this only works for dragging images/objexts to the map, but not for selecting images in the drawing tool.
I like the scaling part in the interface but would gladly accept on or two scale sizes if this speeds up the loading process.
Back to 1.4.0.5 and there's none to zero loading time there. For me it takes about 7-10 sec to load 1 image in the devs version.

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Images from resource lib keep loading

Post by JamzTheMan »

dmmelkor wrote:Jamz, by workaround do you mean using Explorer? As i said before this only works for dragging images/objexts to the map, but not for selecting images in the drawing tool.
I like the scaling part in the interface but would gladly accept on or two scale sizes if this speeds up the loading process.
Back to 1.4.0.5 and there's none to zero loading time there. For me it takes about 7-10 sec to load 1 image in the devs version.
No, by work around I mean clearing your thumbnail cache. Have you tried that yet?
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

User avatar
dmmelkor
Giant
Posts: 104
Joined: Wed Sep 06, 2006 2:42 pm
Location: Netherlands
Contact:

Re: Images from resource lib keep loading

Post by dmmelkor »

Ok, so i doubleclicked on the cache and the number went to zero but the loading of the images halted. Half of the images was loaded (when i clicked), but the rest stayed at the red question mark. Doubleclicking again did not help, the question marks stayed question marks.

Restarted maptool and voila, all the images where there without much delay. It stays smooth but after switching a few times from lib and thus seeing the cache growing, it starts to slow down around 30mb.

btw i could not reproduce the first error (halted after first doubleclick)

Sorry for possible bad grammar, not native

User avatar
JamzTheMan
Great Wyrm
Posts: 1872
Joined: Mon May 10, 2010 12:59 pm
Location: Chicagoland
Contact:

Re: Images from resource lib keep loading

Post by JamzTheMan »

Thanks. So if I removed the cache that should resolve the issue, I will take a look at it.
-Jamz
____________________
Custom MapTool 1.4.x.x Fork: maptool.nerps.net
Custom TokenTool 2.0 Fork: tokentool.nerps.net
More information here: MapTool Nerps! Fork

Post Reply

Return to “MapTool 1.4”