You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
The text was updated successfully, but these errors were encountered:
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 likestore_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).The text was updated successfully, but these errors were encountered: