Additional time-info during the "Compact and optimizing the database"

Started by sinus, August 23, 2016, 04:35:14 PM

Previous topic - Next topic

sinus

I have a database about 230'000 files.
Hence the tool "Compact and Optimizing" does run some minutes, now about 8 minutes.

I like really the info in the box

"The last time this operation took xx Minutes for xxxxxx files.
The database has now xxxxxxx files."


It is really not something important, but it would be nice, if there would be also a "timer", where I could see, how much time is gone.
Or at least when the process begun. Somewhere in the box. So that I would know, ah, it takes still roughly 4 minutes or so.

If so, then I could see quite easy, how long the task will still running and would help me deciding, can I take a coffee or not.  ;D


Best wishes from Switzerland! :-)
Markus


BanjoTom

— Tom, in Lexington, Kentucky, USA

Mario

This is actually harder to do than just adding an extra text.
When the database engine vavuums, compacts and analyzes the database, it does this basically in "one step", without calling back into IMatch to tell IMatch about the current progress.
This makes it impossible to update the progress bar (no info about the progress) and also the IMatch user interface is basically blocked during that call.

The later was annoying, because it could cause the dreaded "Application is not responding" message from Windows.
Since I had a couple of extra minutes and an idea for this today, I solved than one. And now I can also show at least a running timer to indicate the amount of time passed:

II can only really test this with my biggest database. My personal database with 100,000 files compacts in less than 50 seconds (SDD, fast computer).


-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jeknepley

I'm fine with it as is, especially hearing of the difficulty of adding "coffee-break" info. ;D

5 minutes for 257,903 files here (another fast PC with SSD & 32 GB RAM).

I use 2 laptops, both with dual monitors + liberal use of Win 10's Task View feature + Synergy to get at both computer's 4 screens via a single keyboard & mouse. This gives plenty of options on either PC while IMatch is busy - especially using Task View. When IMatch is done, it's done; in the meantime I can keep busy & life is good.

Mario

I didn't do this to spoil your coffee break  ;)

And I did not touch it just for the additional 'running for' info. A quick look at the task bar when the process starts + the mentally adjusted last runtime to get the estimated finish time was always good enough for me.

I made this change to get rid of the UI blocking behavior that causes the 'IMatch is no longer responding' message to display for larger databases. And the ghosting effect Windows applies in this case, which may have confused inexperienced users. Maybe they even thought IMatch had crashed - just because the database is busy 100% and does not give feedback to IMatch.

The 'running for...' display is just a welcome side effect of the de-coupling I did now.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Oh, I see, my coffee-break is a bit unsure, not last because IMatch is so quick.  ;D

You can remember, Mario, I am sure, I asked several times since 2001! for a coffee-button.  8) ;D
The time will come, when I will be a javascript-guru, that I will create a so sophisticated button INSIDE IMatch, that a click on it will turn on my coffee-machine and will start brewing a fine, black coffee.
BTW, from JAVAscript in Indonesia comes also fine coffee, as far as I know.

Joke aside, thanks a lot for your effort to help evaluate the time for the optimizing - and compress - time.
This is really very good to know!

In the attachement comes a reason for break...  :D
Best wishes from Switzerland! :-)
Markus

Mario

QuoteThe time will come, when I will be a javascript-guru, that I will create a so sophisticated button INSIDE IMatch, that a click on it will turn on my coffee-machine and will start brewing a fine, black coffee.

This is now entirely possible.
Some modern coffee 'machines' now can be controlled via apps. And if the vendor did ir right and documented the interface, it is also possible to control the coffee machine from other software - including JavaScript running in IMatch AnywhereTM or IMatch for Windows a bit later  :)
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Best wishes from Switzerland! :-)
Markus