Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use flat for .ty serialization #1514

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Use flat for .ty serialization #1514

wants to merge 1 commit into from

Commits on Sep 24, 2023

  1. Use flat for .ty serialization

    This switches the serialization and deserialization format for our .ty
    files to use the flat library. Flat is one of the fastest serialization
    formats out there and it does indeed provide a speedup for Acton as
    well.
    
    Unfortunately, I started this work based on a vague memory I had of
    having seen that reading the .ty files took up a significant portion of
    total compilation time, in particular when a lot of files are just
    cached / up to date... and so I set out to speed it up. After having
    implemented flat, I see that I misremembered. Reading .ty files is
    actually very fast, the largest one I have takes 4ms. Using flat we cut
    that in half, down to 2ms. If I turn off zlib compression we can get it
    down to 1ms but at the expense of quite a lot larger files (like 4-5x).
    
    The files are about 30% larger with flat than before, but since we're on
    KB or tens of KB level here, that's not much of a deal. A 100% increase
    in speed is worth slightly larger files on disk. If we want ever more
    sp33d, we can consider removing zlib.
    plajjan committed Sep 24, 2023
    Configuration menu
    Copy the full SHA
    301f13f View commit details
    Browse the repository at this point in the history