Way to determine if database is busy?

Plug-in and third party software discussion.
Post Reply
Janus
Posts: 84
Joined: Mon Nov 07, 2016 7:33 pm

Way to determine if database is busy?

Post by Janus »

I am looking for a way to determine if the DB in everything is busy.

I have integrated everything into my personal explorer++ fork as a way of getting directory sizes, and it is fast.
My problem is when I do to many file operations to quickly, it tends to crash.
If I turn off directory sizes, it runs fine.

I also need a way to determine if a directory is in the DB, but that is a separate issue.


Janus.
ovg
Posts: 294
Joined: Thu Oct 27, 2016 7:19 pm

Re: Way to determine if database is busy?

Post by ovg »

Look in everything_ipc.h - EVERYTHING_IPC_IS_DB_BUSY
http://voidtools.com/Everything-SDK.zip
Janus
Posts: 84
Joined: Mon Nov 07, 2016 7:33 pm

Re: Way to determine if database is busy?

Post by Janus »

Thank you.

I have not touched the ipc stuff yet.
I guess I get to now.

What I did was use everything to look up folder sizes in explorer++ because the built in is slow.
To do that with usable performance, I added everything_getfoldersize & everything_foldersizecache functions to the dll.
They use a static cache based on parent directory, that records all the subdirs of the parent, then updates when the parent directory changes.
So I can call the cache to get folder sizes without continually hitting the DB, which is expensive time wise, especially with many subdirs.

Now I will add everything_isindb & everything_isdbbusy functions with boolean returns to the dll(s).
With everything_isindb detecting based on drive letter or share name as relevant.
Then rework my other routines to use them.
I use a mixture of fat, ntfs, cdfs, samba/cifs & ext(3/4) drives, so not being in the DB happens.

I will be posting my current code on my site once I get it cleaned up some more.
Though it works, it is messy.
I do not speak C/C++ very well, okay, I actually hate both, but that is what is there to be used.
I will clean it up as best I can so those who are fluent can use any of it that might be useful.


Janus.
Post Reply