ThumbsPlus

All forums => ThumbsPlus v10 Questions => Topic started by: nzmike on 2022-02-01 02:58:23

Title: Built new PC, transferred TP10 and now it runs like a dog [Solved - SQL issue]
Post by: nzmike on 2022-02-01 02:58:23
Ok, so just built a new PC with 1 x M.2 drive (C:) where TP10 is installed.
I use a SQL Server database with TP10 via an ODBC connection (System DSN) and that resides on a second 7000MB/s 1TB WD SN850 M.2 drive.  My picture folders are on a 750GB SATA6 disk which is not slow (though I'll likely move them on the SN850 soon).

So I installed TP10 on my new PC and now every single time I go into a folder it says "Building file list" and takes ages to do it. If I switch to another folder and switch back it does exactly the same even though it just built the list a few seconds ago!!
If I try to scroll it then stops after half a page and seemingly has to regenerate all the thumbs.

For years I've used this combo (TP10 and SQL Server DB) on my old PC and there was almost no delay selecting folders - images appeared almost instantly and scrolling was not an issue. Most of my folder have between 50-1500 images in them so they are not massive but every single folder takes ages to build the list so it's like nothing is being cached or saved or whatever.

Even doing CTRL-K to add keywords is taking up to 10 seconds just to appear then 10-20 seconds to assign keywords.

I've checked all the settings in TP10 on my old PC against my new PC and they are  *exactly* the same.

If anything it should be *much* faster than my old PC given my M.2 drives but it's running like an dog with three legs.

I've checked everything I can think of with no luck - can anyone suggest anything?
Is there a log I can view to see if there is some sort of permissions issue or something?

I rely on TP10 big time for my business (supplying property photos to the real estate industry) so I need it to work properly - any help or suggestions would be greatly appreciated. 
Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: nzmike on 2022-02-01 03:53:00
I found the log in %appdata% so here is the last few lines from clicking on folders - these have almost no images in them yet we can see it's taking 8 seconds to build them!

Init.c(1701):        @  50.141( 0.016) [Startup] Initialize shell icon and thumbnail access
tp8ui.cpp(158):      @  50.157( 0.016) [Startup] Show, place and update main window pane
Thumbs.c(1335):      @  50.188( 0.031) [Trace] Refry file list; flags: 00000012
 >'E:\Pics'<
overlord.cpp(249):   @  50.235( 0.047) t7480<Overlord> [Trace] Startup cleared 50.219 seconds after start
Thumbs.c(1472):      @  58.407( 8.172) [Trace] Built file list in 8.219 secs. 32 files (32 total), 34 thumbnails (34 total)
Thumbs.c(1335):      @ 299.578(241.171) [Trace] Refry file list; flags: 00000002
 >'E:\Pics\Blk'<
PropPane.cpp(257):   @ 299.594( 0.016) [Startup] Expanded Info Tab categories initialized. Expanded items: 3. List size: 15 chars. Items = ';Info;Metadata;'.
Thumbs.c(1472):      @ 307.813( 8.219) [Trace] Built file list in 8.235 secs. 47 files (47 total), 47 thumbnails (47 total)
Thumbs.c(1335):      @ 315.828( 8.015) [Trace] Refry file list; flags: 00000002
 >'E:\Pics\Clb'<
Thumbs.c(1472):      @ 319.953( 4.125) [Trace] Built file list in 4.125 secs. 0 files (0 total), 0 thumbnails (0 total)
Thumbs.c(1335):      @ 319.953( 0.000) [Trace] Refry file list; flags: 00000002
 >'E:\Pics\Col'<
Thumbs.c(1472):      @ 328.282( 8.329) [Trace] Built file list in 8.329 secs. 202 files (202 total), 203 thumbnails (203 total)
Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: Daan van Rooijen on 2022-02-01 10:31:48
Are both your harddrives regular internal drives? (not running over a USB port or a network)

Have you read the performance hints on the website? Hopefully those will offer a clue or two: http://www.thumbsplus.com/performance.html

You could also try turning SQL tracing on in Windows, to see if that reveals anything (or turn it off it it already is on, because it does slow things down). Have you tried running (or maybe even reinstalling) TP with Admin rights? And (easier) run it after booting Windows in Safe mode, to exclude that a third party app or driver is interfering?
Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: Daan van Rooijen on 2022-02-01 10:47:56
Something else that you could try:

Exit ThumbsPlus, locate your Thumbs10.ini configuration file and make a backup copy of it. Then open it in Notepad and add this section to it:

[Virtualmemory]
Minalloc=0

Save the file and re-launch TP10 to see if it makes a difference. It would disable the built-in virtual memory manager, which can cause delays too. If it does not help, I would exit TP again and restore the previous .ini file.

Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: pie.photo on 2022-02-01 11:34:14
Another suggestion ..
Create a new (native, not connected by ODBC) database only for testing if it also is too slow. So you could narrow down if the cause is in the database or somewhere else. You only need to import some directories to compare the times.
To give you some measured times to compare:
I have a local (but not very fast) SATA-disk with all my image files. The database (PostgreSQL over ODBC) runs on the fast M.2 system drive. To show all 223320 image files (Include Child Folders) with TP 10 it takes about 8.5 seconds.
The total number of files in this directory is much higher (374205) because there are also XMP-, RAW- and some other files which I do not include in the database.

I also have a NAS box (connected with 1Gb Ethernet) with 259095 image files. On the same NAS-box is running the PostgreSQL database (over ODBC). To show all files it takes about 2 minutes and 18 seconds. The last 30 seconds of this time are needed for "scanning" thumbnails.
Hope you can find the reason soon!
Ernst
Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: nzmike on 2022-02-01 19:35:33
Thanks for the suggestions everyone.   

I had installed from an older TP10 .exe file so re-installed the latest version from the site.
Then from a bit more googling I realised I needed to set up the system DNS using the ODBC for SQL Server 2017 driver rather than the native SQL Server driver.  Once I restarted TP and connected to the new DB everything was back to normal as running as fast I expected :-)

Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: Daan van Rooijen on 2022-02-01 20:04:31
Then from a bit more googling I realised I needed to set up the system DNS using the ODBC for SQL Server 2017 driver rather than the native SQL Server driver.

Great to hear that it's working properly again, and thanks for getting back with the solution. If you remember where you read about that solution, I'd be curious to read it too -- do you still have the link? Was it specific to ThumbsPlus or was it a more generic solution for SQL-based databases?
Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: nzmike on 2022-02-02 03:12:31
I was just googling about general ODBC connections to third party apps (so not TP specific) and a couple of sites said to use the new driver.  It  could be something to do with the fact I also upgraded to SQL Server 2019 for my new PC, perhaps the native driver is just not tuned for the new version because my old PC (on SQL 2017)   used the native driver and it was very fast.
Title: Re: Built new PC, transferred TP10 and now it runs like a dog
Post by: Daan van Rooijen on 2022-02-02 09:41:49
Interesting, and maybe it will help someone else. Thanks again!