Open
Description
Aspen currently supports keeping the contents of static files in RAM (the store_static_files_in_ram
setting). I think it should also support keeping open file descriptors instead. It would be a middle ground alternative that improves performance and reliability compared to opening the files over and over, without wasting RAM like store_static_files_in_ram
does.
The performance problem of opening the files over and over is that we have to call os.path.realpath()
every time to check that the file isn't outside the allowed directories. That function is slow because it has to make a system call for every parent directory (and because it's written in pure Python, but it would still be slowish if it was written in C).
Metadata
Metadata
Assignees
Labels
No labels