windows
zip: https://github.com/hydrusnetwork/hydrus/releases/download/v197/Hydrus.Network.197.-.Windows.-.Extract.only.zip
exe: https://github.com/hydrusnetwork/hydrus/releases/download/v197/Hydrus.Network.197.-.Windows.-.Installer.exe
os x
app: https://github.com/hydrusnetwork/hydrus/releases/download/v197/Hydrus.Network.197.-.OS.X.-.App.dmg
tar.gz: https://github.com/hydrusnetwork/hydrus/releases/download/v197/Hydrus.Network.197.-.OS.X.-.Extract.only.tar.gz
linux
tar.gz: https://github.com/hydrusnetwork/hydrus/releases/download/v197/Hydrus.Network.197.-.Linux.-.Executable.tar.gz
source
tar.gz: https://github.com/hydrusnetwork/hydrus/archive/v197.tar.gz
I had a great week. I fixed a bunch of bugs, and I managed to finish the first version of the first part of my new autocomplete cache layer. Depending on the size of your database and the speed of your computer, this week's update could take a little while, but once it is done, a lot of autocomplete results will appear very quickly, every time.
new cache layer
So, everything has generally gone to plan and even ahead of schedule, and I am overall really pleased. There's a new subfolder at install_dir/db/client_cache that will be populated by some new databases when you next boot the client. These databases cost a little extra CPU to maintain whenever new tags or files are added, but they can produce autocomplete results in a few milliseconds. Ultimately, the whole delay from sending the search string to the db to getting, sorting, filtering, and displaying the results typically maxes out at about 200ms. The part that was really lagging previously, where tags were being counted before being added to the old cache, which often took 9 seconds or so, now typically takes <5ms.
Ultimately, the biggest delay in autocomplete results for many people is now the artificial between-keypresses delay set in file->options->speed and memory, so make sure you check these options now and in the future as I roll out more of this new cache.
At the moment, this new cache supports autocomplete queries that have specific file services. Any autocomplete dropdown that has 'all known files' set (typically when you enter tags in the manage tags dialog) will use the old system, but anything else will search very quickly. Any search domains that include 'all known tags', are very fast but sometimes include counts that are too high.
The new cache databases are continually updated whenever you add or remove new files or tags. In my testing so far, I haven't noticed much slowdown in repository processing, but I would like to know if you notice your processing speed drops a great deal this week, or if perhaps importing some files or closing the manage tags dialog always produces a second's extra lag or similar.
The new caches have to sync up to the existing services, which basically means counting every single mapping by hand for each one. They try to do this efficiently by filtering only to pertinent file-mappings, but it can still take a while.
My fast i5 6400 dev computer with 6,000 files/20m mappings took about 2 minutes to update to v197, while my medium-fast i7 4700MQ IRL laptop with 300k files/50m mappings took 17 minutes. My 2.26GHz Core 2 Duo OS X testing laptop did a fairly more complicated db than my dev machine in 40 minutes, while my slow AMD E-450 Linux testing laptop is now on hour 2 as I write this. So: if you have a slow computer, prepare to wait a while for this week's update. Run a defrag beforehand if you know how, and make sure it isn't doing anything CPU or HDD heavy when you do update. Even if you have a fast machine, make sure you have a bit of padding in your schedule, just in case. Keep using v196 for a couple of days if you expect to have to shut your computer down or watch 1080p or play vidya or whatever.
If you don't sync with my PTR and don't otherwise have many millions of mappings, the update to v197 will probably take about five seconds.
Given the new cache's success, I will extend it to the 'all known files' service next, which shouldn't be too difficult, and then experiment with getting more accurate counts for 'all known tags', which may or may not prove worth it. There are also some database->maintenance->regen x ac_cache manual maintenance stuff I would like to add, in case anyone discovers a way these things can desync, and adding auto-vacuum and so on.
Caveat to all this: There is a lot of new code here, so let me know if you get wildly incorrect autocomplete results, or errors, or anything else you do not expect. I have seen some unreliable sibling behaviour for short exact-match sibling queries, so I will look into that, and I think the autocomplete result sorting is borked, although I can't remember if that is a new or old problem.
full list
- on client boot, autocomplete caches for specific file/tag service cross-references are now initialised and populated. progress is shown on the splash window
- on client boot, surplus autocomplete caches are deleted
- on service add, new autocomplete caches are created
- on file add/delete, autocomplete caches are updated
- on mappings pend/add/rescind pend/delete, autocomplete caches are updated
- the new autocomplete caches are consulted for all non-'all known tags' queries
- the old autocomplete cache no longer stores counts for specific file services, and the remaining associated maintenance calls are deleted
- databases now start their own mainloops
- databases now wait for their mainloops to finish prepping any large caches before they return to the controller
- the client database waits for autocomplete caches to finish before it finishes its own mainloop
- the padding around flash and the animation bar are included more accurately in some media zoom calculations, which should eliminate some general zoom jankiness and accidental 100% flash zoom coincidences that filled up the whole canvas
- fixed some clientside server boot error spam when local server or booru had no port set
- account refreshes that fail due to a network error will spam less to the log
- fixed .txt unicode tag parsing from import folders, which was not decoding at the correct step
- administrator immediate repository syncs now sync thumbnail downloads if needed
- service thumbnail sync will no longer superfluously check the presence of thumbnails whose files are local
- if a tag entered into the manage tags dialog has a sibling that already exists for all files, then a new 'ignore, as the sibling already exists' choice will appear
- fixed an overcounting bug in 'selection tags' when importing and adding tags at the same time
- fixed a typo in repository sync status text that was overcounting total number of updates by one
- fixed youtube downloader, which broke with the new library on my new dev machine
- the way that tags and predicates are filtered against a tag autocomplete text entry is now much faster
- bumped up the default content update chunk threshold from 100 rows to 5,000, which seems to be speeding up processing significantly, with a cost to recovery latency–see how it works for you
next week
Assuming this new cache doesn't explode for anyone, I'll go back to IPFS and try to get a directory parser/downloader working.