Saving sessions on a schedule?

Discussion related to "Everything" 1.5 Alpha.
Post Reply
NotNull
Posts: 5298
Joined: Wed May 24, 2017 9:22 pm

Saving sessions on a schedule?

Post by NotNull »

Just curious:

Why are sessions saved every 15 seconds instead of onclose of tab/window?
Firefox also saves sessions on a schedule (also 15 seconds, btw) so there must be a good reason why.

Because Everything does not get a signal when it (= Everything) is closed or not enough time to save the session?
void
Developer
Posts: 15523
Joined: Fri Oct 16, 2009 11:31 pm

Re: Saving sessions on a schedule?

Post by void »

Ideally, you will be able to recover a previous search where the Everything process ended unexpectedly. (eg: power loss)
If the session was created on close, these searches would be lost.

Everything schedules the session to be saved after each change to your search.
This can only occur once every 15 seconds.

If there's no change to your search, the session is not saved.
The session on disk is only updated when your search changes.
There's no need to worry about SSD wear as there's only a few bytes written to disk daily.

The session is also saved when you exit Everything.



examples:

I paste "c:\windows\" into the search box

The session is saved with "c:\windows\" as the search.
The "c:\windows\" search is executed.



I manually type in a search: foo

I type in: f

The session is saved with f as the search.
An internal timer is created to delay the session from saving for 15 seconds.
The f search is executed.

I type in: o

Saving the session to disk is delayed..
The fo search is executed.

I type in: o

Saving the session to disk is delayed..
The foo search is executed.

after about 15 seconds since the first search change, the session is saved with foo as the search.
No further sessions are saved until I change the search again.




Currently the result list focus and selection is not saved in the session.
This might be added at a later date.
NotNull
Posts: 5298
Joined: Wed May 24, 2017 9:22 pm

Re: Saving sessions on a schedule?

Post by NotNull »

Got it. Thank you for explaining!

One question though:
void wrote: Tue Apr 30, 2024 5:02 am The session is also saved when you exit Everything.
Exit the GUI ( File => Close Window) or stopping the process ( File => Exit) ?
(probably the latter, but better be sure)
void
Developer
Posts: 15523
Joined: Fri Oct 16, 2009 11:31 pm

Re: Saving sessions on a schedule?

Post by void »

When you stop the process (File -> Exit)
Post Reply