This question is answered. Helpful answers available: 1. Correct answers available: 1.


Permlink Replies: 11 - Pages: 1 - Last Post: 15 Jun 21, 20:58 Last Post By: davidekholm Threads: [ Previous | Next ]
GiovanniSantin

Posts: 5
Registered: 5-Aug-2007
Set crop focus extremely slow
Posted: 8 Jun 21, 18:37
 
  Click to reply to this thread Reply
Dear developers and fellow users,

When I select right click + "Set crop focus" to adjust the thumbnail crop position for each image, the window for the crop position selection is extremely slow to appear.

With slow I mean that it takes between 15 and 25 seconds each time!

This means that for a new set of 200 images, I am forced to spend 50 minutes just for adjusting the thumbnail crop, mostly spent on waiting for that window to appear each time.

My album has about 6,000 images. Can the problem be related to the total number of images in the album? (I do not know what jAlbum of Tiger need to do when I click "Set crop focus".

I'd be interested to know if other users experienced the same problem, and whether anybody has a solution for this.

Thank you in advance
Giovanni
JeffTucker

Posts: 7,384
Registered: 31-Jan-2006
Re: Set crop focus extremely slow
Posted: 8 Jun 21, 20:21   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
(Thread moved - this is a jAlbum core function, not related to a particular skin.)
JeffTucker

Posts: 7,384
Registered: 31-Jan-2006
Re: Set crop focus extremely slow
Posted: 8 Jun 21, 20:25   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Not sure what could be going wrong here. For me, the crop window appears instantly, with no delay, even in a very large project.

As a starting point, I would suggest doing a thorough removal of the application, followed by a clean reinstall. There may be some old jar files hanging around, from much earlier versions of jAlbum.

Follow the instructions in this thread. Don't skip any steps!

https://jalbum.net/forum/thread.jspa?threadID=35746
davidekholm

Posts: 3,676
Registered: 18-Oct-2002
Re: Set crop focus extremely slow
Posted: 9 Jun 21, 11:29   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Thanks for reporting. I haven't heard about this issue before. Is it perhaps specific to those images or will it be slow no matter what images you try to open? It's good for me to know what image type (JPEG etc) you try to set crop focus for and the image resolution.

Here's a test you can make: Paste and execute the following code in the upper panel of jAlbum's System console (F7). Use The execute button to execute. Now jAlbum will wait 10 seconds in the background and then take two snapshots of what each execution thread is doing (a "thread dump"), each thread dump separated by 5 seconds of delay, so the sequence will be:
1) waiting 10s
2) taking 1:st thread dump
3) waiting another 5s
4) taking 2:nd thread dump

Ensure that you try opening the crop focus dialog during the initial 10s delay, then both thread dumps should together reveal what's causing this massive delay. Pass these thread dump files to me (jAlbum will point them out for you)

Code ("Groovy" language mode):
new Thread(() -> {
	window.statusBar.setText("Prepare yourself to open the crop focus seletor...");
	Thread.sleep(5000);
	window.statusBar.setText("Open it now!");
	Thread.sleep(5000);
	window.statusBar.setText("Dumping threads");
	JAlbum.dumpThreads();
	Thread.sleep(5000);
	JAlbum.dumpThreads();	
}).start();
GiovanniSantin

Posts: 5
Registered: 5-Aug-2007
Re: Set crop focus extremely slow
Posted: 9 Jun 21, 22:34   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Attachment thread-dump-3.txt (43.8 KB)
Attachment thread-dump-2.txt (42.6 KB)
Attachment thread-dump-1.txt (44.1 KB)
Attachment thread-dump.txt (42.6 KB)
Thanks Jeff and David for the responses!

I tried the clean reinstall, that unfortunately did not help, as it is still taking 20 seconds or more for the crop focus window to appear.

I have to say that my laptop behaviour recently lets me think that something may be wrong with the Windows OS or Java, or there are some conflicts. So I cannot exclude e local problem. But this slow response is also happening if I only have jAlbum open, just after I start the computer, with no other applications running.

I have followed now David's instructions with the code in the System console. I attach the dump files (4 files from running it twice)

For info: I am running jAlbum on Windows 10 Enterprise 20H2.

I am working now on jpg files

Thanks a lot for your support, I really appreciate it!
Regards,
Giovanni
davidekholm

Posts: 3,676
Registered: 18-Oct-2002
Re: Set crop focus extremely slow
Posted: 9 Jun 21, 23:35   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Thanks for these thread dumps, they point out a more basic problem I need to address in jAlbum, but now I'll focus on presenting a workaround for you. What seems to cause this slowness is that you probably have a large number of images ordered by camera date. This triggers a lot of I/O when opening each image in order to retrieve the camera date. Just select the root folder of your project, then select "Tools->External tools->Cache image ordering". This will switch from camera date ordering to custom ordering but preserve the existing image ordering. Custom ordering is far faster than image ordering.
GiovanniSantin

Posts: 5
Registered: 5-Aug-2007
Re: Set crop focus extremely slow
Posted: 14 Jun 21, 11:08   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Hi David,

Sorry that it took me longer than expected to address this, as for an unlucky time coincidence I had some hiccups in the same album with the new version 3 of Tiger, which just came out. (I'll post something on that separately, I see people are already giving some fedback).

Back to the "Set crop focus" issue:

The caching of the photo ordering that you proposed did not improve the situation.

But I think I solved the problem by creating a totally new album project for the same images. The original album project was created several years ago (when Tiger was first created) so one possibility is that some old jAlbum settings in my project file were interfering with newer jAlbum features.

Thank you for your support, best regards,
Giovanni
davidekholm

Posts: 3,676
Registered: 18-Oct-2002
Re: Set crop focus extremely slow
Posted: 14 Jun 21, 12:38   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Hi. That should really have helped the situation. Feel free to pass me new thread dumps if you continue to experience slowness. You can also wait until jAlbum 24 is released. There I've addressed the root cause.
GiovanniSantin

Posts: 5
Registered: 5-Aug-2007
Re: Set crop focus extremely slow
Posted: 15 Jun 21, 09:57   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Indeed the problem is not solved, unfortunately.

In my brand new jAlbum project (which displays the same 6k images as the old project) the Set crop focus window initially loaded as fast as it should, but as soon as set the Order by / Camera date in one image sub-folder, the entire project started behaving as before.

However, I am unable to see any effect from your recipe to cache the image order. After I click on the Set crop focus in the right-cllck menu, I get a small window that says "Processed 0 items in 0.042 s".

Intermittently, I also have a different problem that prevents jAlbum from opening any sub-window (it refuses to open even the Help/About window) and it throws the following message in the System console:

Exception in thread "AWT-EventQueue-0" java.lang.InternalError: The current process has used all of its system allowance of handles for Window Manager objects.

at java.desktop/sun.awt.windows.WToolkit.eventLoop(Native Method)
at java.desktop/sun.awt.windows.WToolkit.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)

It also refuses to Exit, with the same error in the console, and in order to close jAlbum I have to end the task from the Windows Task manager

After jAlbum restart, this problem disappears.

Back to the Set crop focus problem:

In my 6k image structure I created one new sub-folder with only one jpg picture inside.
Even in that sub-folder, the Set crop focus window takes very long to appear. For this sub-folder, I include here the dump files from your script. Maybe it helps.

Thanks
Giovanni
davidekholm

Posts: 3,676
Registered: 18-Oct-2002
Re: Set crop focus extremely slow
Posted: 15 Jun 21, 17:05   in response to: GiovanniSantin in response to: GiovanniSantin
Helpful
  Click to reply to this thread Reply
I've now made several steps to improve this performance. Please try the following:
1) Get jAlbum 24 beta from http://jalbum.net/forum/thread.jspa?threadID=57337&tstart=0
2) Replace the file lib/jalbum-core.jar with this one: https://jalbum.net/download/beta/jalbum-core.jar

jAlbum's splash screen should now read v24b22. Let me know how performant it is for you now!
GiovanniSantin

Posts: 5
Registered: 5-Aug-2007
Re: Set crop focus extremely slow
Posted: 15 Jun 21, 19:24   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
Dear David
the new jAlbum core library (v24b22) solves the problem here, the Set crop focus window loads in a fraction of a second now!
Thanks a lot for your help!
Giovanni
davidekholm

Posts: 3,676
Registered: 18-Oct-2002
Re: Set crop focus extremely slow
Posted: 15 Jun 21, 20:58   in response to: GiovanniSantin in response to: GiovanniSantin
 
  Click to reply to this thread Reply
You're welcome!
Legend
Forum admins
Helpful Answer
Correct Answer

Point your RSS reader here for a feed of the latest messages in all forums