Environment
- Despite being in the RAM gold age, DDR5 64GB was purchased from carrots as if possessed by something
- windows11
Goal
- Simple python util, using ramdisk for all source code and files that don't require management
- Everything that can be volatile should be on the ramdisk
- No need to restore ramdisk contents after reboot
- Since SSD and ramdisk are used together, the source code must be safely stored on the SSD.
Ramdisk
- Program performance seems to vary slightly, using Imdisk which is free and has no special features
Ideas
- Create a project on the ramdisk and periodically copy the source code to the SSD
- If you don't back up the code to the SSD, it's likely to be deleted
- Use a program that syncs the SSD and ramdisk
- There are many settings and it's cumbersome
Chosen Method (chatgpt told me ㅎ)
- Create a project on the local SSD ( <<-- important )
- Source code and important files will be stored on the local SSD.
- Create build, .venv folders on the ramdisk and create symbolic links in the current project directory
- Intermediate files are all on the ramdisk.
- mklink /d .venv R:\my_gui_env
- Since symbolic links are not further explored in gitignore, it is also convenient to use git
- Create _pycache_ on the ramdisk.
- pyinstaller --workpath R:\pyinstaller_build --distpath R:\pyinstaller_dist --onefile main.py
- Created a PowerShell script as requested.
Advantages
- Since it was tested with a very small utility, I don't know the performance improvement. There will likely be a significant difference for large apps.
- Even if you compress the project folder, only the source code is compressed, making the size very small. (It will also be convenient in git)
Next Attempt
- Find a way to save intermediate files on the ramdisk while creating an app with Android Studio
- This is expected to have a significant effect.
Impression
- It was simpler than I thought. Create a basic project in local storage, create a folder for intermediate files on the ramdisk, and connect it to the project folder using symbolic links.
- It seems that it can be used in the same way with other development tools or environments. Create a symbolic link for the ramdisk folder and use it.
End.