read_to_end() "guesses" the total amount of data to read by doing
roughly 5 calls per couple hundred bytes: it starts by guessing
it's 32 bytes long, then another 32, then 64, then 128, and then
a final call to make sure there's nothing more.
The read() call is somewhat expensive in that it involves initializing
and sending page-sized memory chunks, and every time it also
descends the entire basis hierarchy, recomputing the overlay.
Probably, this can be improved with some sort of server-side caching
of read results -- if a file is read, it seems very likely that
the next few bytes will be read and a smarter caching implementation
could smooth over some of the expense.
However, a much easier fix for now is to just change the read
call to read exactly the length of the file being presented. Since
we already have the key handle, we can get the attributes and then
do a single read of the exact amount.
Doing this improves the speed of the UX substantially, about 40%
faster for the same operation (at least).
this patch moves us off the branch we had to hop on for cipher
API compatibility to the one that's officially published by
RustCrypto. This closes#168.
turns out, they're pretty useless. I mean, for debugging actual
running code. it tells us basically what we know already which is
99.99% of the time is spent waiting on inter-thread messaging
in hosted mode.
these are all helper scripts specific to my system that aren't
really useful to anyone.
also made it generally the case that scripts in the root directory
are ignored. "generally useful" tools are put in the `tools` directory.
stuff in the root directory is just notes and bits for me to chew on.
if anyone objects to these feel free to revert them, but it's
nice to have some helper scripts local to my machine in the root
dir that don't always show up in my status.
noticed it's hitting exactly when NTP updates because it also
happens on a 24-hour schedule, staggering a bit to try and keep
everything from hitting exactly at the same time once a day.