<div dir="ltr"><div class="gmail_default" style="color:rgb(0,0,0)"><span style="color:rgb(34,34,34)">On Tue, Apr 10, 2018 at 5:03 PM, Steven D'Aprano </span><span dir="ltr" style="color:rgb(34,34,34)"><<a href="mailto:steve@pearwood.info" target="_blank">steve@pearwood.info</a>></span><span style="color:rgb(34,34,34)"> wrote:</span><br></div><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
    __pycache__/spam.cpython-38.<wbr>pyc<br>
    __pycache__/spam.cpython-38-<wbr>doc.pyc<br>
    __pycache__/spam.cpython-38-<wbr>lno.pyc<br>
    __pycache__/spam.cpython-38-<wbr>ann.pyc<br></blockquote><div><br></div><div class="gmail_default" style="color:rgb(0,0,0)">​Our product uses the doc strings for auto-generated help, so we need to keep those.  We also allow users to write plugins and scripts, so getting valid feedback in tracebacks is essential for our support people, so we'll keep the lno files, too.  Annotations can probably go.</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">Looking at one of our little pyc files, I see:</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">-rwx------+ 1 efahlgren admins  9252 Apr 10 17:25 ./lm/lib/config.pyc*​<br></div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">Since disk blocks are typically 4096 bytes, that's really a 12k file.  Let's say it's 8k of byte code, 1k of doc, a bit of lno.  So the proposed layout would give:</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">config.pyc -> 8k</div><div class="gmail_default" style="color:rgb(0,0,0)">config-doc.pyc -> 4k</div><div class="gmail_default" style="color:rgb(0,0,0)">config-lno.pyc -> 4k</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">So now I've increased disk usage by 25% (yeah yeah, I know, I picked that small file on purpose to illustrate the point, but it's not unusual).</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">These files are often opened over a network, at least for user plugins.  This can take a really, really long time on some of our poorly connected machines, like 1-2 seconds per file (no kidding, it's horrible).  Now instead of opening just one file in 1-2 seconds, we have increased the time by 300%, just to do the stat+open, probably another stat to make sure there's no "ann" file laying about.  Ouch.</div><div class="gmail_default" style="color:rgb(0,0,0)"><br></div><div class="gmail_default" style="color:rgb(0,0,0)">-1 from me.</div></div><br></div></div>