v5.24.0 new features + optimizations¶
Changed¶
Multi-bars in concurrency¶
Now
parprocstreams/iterates onlyResultobject. Using the results stream for passing other information led to complicated code.All update notifications in crross-process update of
barzbars go through apacketzqueue. NowPacketzQueueis JSON-serializable for that purpose. The actual payload of a queue passed across tasks or processes is the path to the file-based queue.Synchronization through a queue is dome by a
barz.BarBrokerwhich is opt-in for users of the library.BarBrokeruses a daemon thread to read the queue and callupdate_row()on theMulti.Multi.heightstarts at-1as the magic number to preserve the line position before drawing of the first bar.Keeping the files for queues happeens on a per-queue basis with
Packetz(keep=True). The files are stored uner./packetz/by default. The format of the filenames isaaaa-HH-mmmm.pkz.jsonl, whereaaaais four letters representing the Unix timestamp day in baselen(strings.ascii_loweercase),HHis the UTC hour, andmmmmis the fraction of the hour in tenth mof millisecond. The format of the files is JSONL, with one line of flattened JSON per packet. Keeping all the files for queues may be activated by setting thePACKETZ_KEEPenvironment variable to non-falsy.Optimized
PacketzQueue.receive()to read by line and retry if a line of JSONL was incomplete (no newline at the end).
Other¶
Changed the documentatiion theme to Furo.
OGoPEGo¶
A round of removing memory and transformation bottlenecks has OGoPEGo generating the fastest parsers among the TatSu family of PEG parser generators. When the CLI combines the parser speed with Go’s implementation of concurrency the result feel instantaneous.