PINCE icon indicating copy to clipboard operation
PINCE copied to clipboard

Don't write python-bytecode

Open timschumi opened this issue 5 years ago • 3 comments

timschumi avatar Mar 08 '19 15:03 timschumi

Is this really necessary tho? I mean, pyc files are already ignored by .gitignore. What kind of harm do they cause?

korcankaraokcu avatar Mar 08 '19 16:03 korcankaraokcu

While they are indeed a non-issue in a development tree, package managers don't really expect new files in program directories. While some package managers are just failing to do cleanup, others start to print warnings if they can't remove a directory because a file is inside.

In the end it's still a fairly cosmetic issue and everything would still work fine, even if those files exist.

timschumi avatar Mar 08 '19 16:03 timschumi

Running without cached files might cause slight overhead on startup for low-end machines. However, I'll keep this PR open for future reference, it might see partial use in the future, esp when packaging gets involved as you mentioned

korcankaraokcu avatar Mar 09 '19 01:03 korcankaraokcu

I'd like to throw my own 2 cents in here. When I had issues with PINCE not working because intltool wasn't installed, I deleted the PINCE folder and decided to try again. However, the bytecode file PINCE/__pycache__/PINCE.cpython-310.pyc was created as root somehow, and now the folder is sitting in my trash, undeletable.

biggestsonicfan avatar Oct 19 '22 11:10 biggestsonicfan

However, the bytecode file PINCE/__pycache__/PINCE.cpython-310.pyc was created as root somehow, and now the folder is sitting in my trash, undeletable.

For your specific issue, you can probably just go into ~/.local/share/Trash and remove/chown the affected files manually.

That said, time for me to rebase the PR and resolve some conflicts? I still don't have any performance metrics for how this affects startup time, but I think that now, 3 years later, we could reevaluate whether this results in a performance impact that is even worth considering. :^)

timschumi avatar Oct 19 '22 12:10 timschumi

I've done the tests again and the difference is not even measurable. Maybe I was being way too cautious back then, time to relax. Thanks for your contribution!

korcankaraokcu avatar Oct 20 '22 00:10 korcankaraokcu