Page 1 of 1

0.68 - 64bit: Search feature bugs/problems

Posted: Fri Aug 15, 2014 5:01 pm
by CreativeWorld
Tools - Search:

- when many files found for user-defined criteria (around 20000 in my case), pressing View crashes the application.

- while searching, both Abort and Cancel buttons available. Both cancels the search. I think there should be a feature to stop searching but leave the results of found files so far, for user to be able to view them.

- there is a Use database option but it doesn't seem to do anything. At least, after including some folder in the Options - Database - Excluded/Included, the application doesn't seem to process that while using Search. It always returns zero results.

Re: 0.68 - 64bit: Search feature bugs/problems

Posted: Sat Aug 16, 2014 6:03 am
by m.Th.
CreativeWorld wrote:Tools - Search:

- when many files found for user-defined criteria (around 20000 in my case), pressing View crashes the application.
Yes, sure. Especially if you have the 32bit version.

XnView MP tries to cache all files/thumbs and it eats all memory available which for the 32bit version is only 2GB. Same happens for x64 but at a greater limit. Note: actually the memory usage will show you something @ 1.6 GB because 0.4-0.2 GB are other (shared?) data structures, memory areas etc.

How to fix: Usually through a window cache. Reserve for memory cache only user configurable 'nnnn' MB (default 1.5 GB = 1500 MB) if the cache is full use a cache algorithm(even a simple LRU will fit) to discard the old data in chunks.

- while searching, both Abort and Cancel buttons available. Both cancels the search. I think there should be a feature to stop searching but leave the results of found files so far, for user to be able to view them.
Yes, sure. (again) :)

I'd vote for {Stop} which saves the results and {Cancel} which closes the window without saving them.

- there is a Use database option but it doesn't seem to do anything. At least, after including some folder in the Options - Database - Excluded/Included, the application doesn't seem to process that while using Search. It always returns zero results.
Eh... big story here. Needs rework. Both GUI and the engine. Basically I think that the folder in which you search needs to be already in DB. But as I said, it needs rework, IMHO - of course.

Re: 0.68 - 64bit: Search feature bugs/problems

Posted: Sat Aug 16, 2014 8:40 am
by CreativeWorld
m.Th. wrote:XnView MP tries to cache all files/thumbs and it eats all memory available which for the 32bit version is only 2GB. Same happens for x64 but at a greater limit. Note: actually the memory usage will show you something @ 1.6 GB because 0.4-0.2 GB are other (shared?) data structures, memory areas etc.

How to fix: Usually through a window cache. Reserve for memory cache only user configurable 'nnnn' MB (default 1.5 GB = 1500 MB) if the cache is full use a cache algorithm(even a simple LRU will fit) to discard the old data in chunks.
As already mentioned in header, I'm using 64-bit. Memory usage was around 50 MB all the times, but I waschecking a default task manager so it could be not a "complete usage" attribute.

My current pagefile in Windows is 16 GB. Is that what I should increase? How much should I set?
m.Th. wrote:Basically I think that the folder in which you search needs to be already in DB.
Exactly what I'm doing - I've added my folder into Database/Included AND I've set it in Search dialog already. I just don't know if the application is doing anything with that folder at all. Perhaps I'm missing something and there is an option to "process that folder into DB", but I don't see it anywhere.

Re: 0.68 - 64bit: Search feature bugs/problems

Posted: Wed Aug 20, 2014 8:51 am
by m.Th.
CreativeWorld wrote:
m.Th. wrote:XnView MP tries to cache all files/thumbs and it eats all memory available which for the 32bit version is only 2GB. Same happens for x64 but at a greater limit. Note: actually the memory usage will show you something @ 1.6 GB because 0.4-0.2 GB are other (shared?) data structures, memory areas etc.

How to fix: Usually through a window cache. Reserve for memory cache only user configurable 'nnnn' MB (default 1.5 GB = 1500 MB) if the cache is full use a cache algorithm(even a simple LRU will fit) to discard the old data in chunks.
As already mentioned in header, I'm using 64-bit. Memory usage was around 50 MB all the times, but I waschecking a default task manager so it could be not a "complete usage" attribute.
Download Process Hacker which is an awesome small program (if you're geek you don't need the installer, just the binary files and run the executable directly from the x64 subfolder - see the zip when you'll download it). Run it and after that run XnView MP. In the Process Hacker's main window appears somewhere the xnview.exe as a running process. Double click on it and select the 'Performance' tab. Now some graphs appear - pay attention at the 'Private bytes' which shows the Memory allocated. Leave the window open.

Now return at XnView MP and run your search till XnView crashes. After crash, come back to the XnView (now dead) detail window in Process Hacker. What does it say? Can you post a screen shot?

My current pagefile in Windows is 16 GB. Is that what I should increase? How much should I set?
Not relevant for our discussion. Leave as it is for now. As an aside, Windows will tell you and will (try to) expand the swap file automatically if it is full and the memory manager gets requests which cannot honor.
m.Th. wrote:Basically I think that the folder in which you search needs to be already in DB.
Exactly what I'm doing - I've added my folder into Database/Included AND I've set it in Search dialog already. I just don't know if the application is doing anything with that folder at all. Perhaps I'm missing something and there is an option to "process that folder into DB", but I don't see it anywhere.
Database/Included doesn't mean that the folder is included into the DB. In fact, I don't know what really means. Perhaps Pierre will enlighten us.

In order to include a folder in DB you should:

1. Scan it: Go with the Browser and 'look' at thumbs. Leave the process to finish. Additionally, if you want also the subfolders, till Pierre will implement the 'Show all files button', right-click on the folder in the Folders tree and choose 'Show all files (recursive)'. Beware that if it has also many files in there it can crash due of topic at hand (memory exhaustion).

2. Add folder: It is the preferred method for many many files. Go to Settings | Database (but NOT on the Excluded/Included tab) and in the main 'Database' tab press 'Add Folder...'. Wait for the process to finish.