Repository navigation
Conversation
This commit introduces a save file manager to avoid the lag/lock caused by autosave when working on projects with a high polycount. The issue was discussed on Discord, where users noted that autosave could freeze the application because file saving runs in the same main process. With modern memory availability, Wings3D can handle the data demands of high‑poly projects relatively well. However, autosave becomes inconvenient due to the blocking behavior of the current saving mechanism. The new save file manager separates this process, preventing locks and making saving and autosaving smoother. I also took in acount a comment present in the wings_file:autosave/1: %% Maybe this should be spawned to another process %% to let the autosaving be done in the background. %% But I don't want to copy a really big model either.
be1aa65 to
cf1fed7
Compare
|
I used GPT to help me code the server since I hadn’t worked on something like this before. To evaluate the performance gain, I used my Wheel project, which has 573K polygons. I ran tests disabling compression and also tried different compression levels. Currently, Wings3D uses a compress option without a level parameter, so I don’t know which level it defaults to (0 = disabled, 1..9). The documentation doesn’t specify this either. 1. Lock Duration Comparison
2. Total Time by Compression Level
3. Overall Recording Time Comparison
4. Performance Summary
|
|
@dgud , I hope you cold evaluate this new implementation and suggest/fix anything I may be wrong since it's a new land for me. It's working as far as I have tested the possible conditions without a hard crash. src/wings_save_manager.erl - The new server module; |
|
Ok I have reworked this and merged a variant I liked, thanks for the basic work. |
This commit introduces a save file manager to avoid the lag/lock caused by
autosave when working on projects with a high polycount. The issue was
discussed on Discord, where users noted that autosave could freeze the
application because file saving runs in the same main process.
With modern memory availability, Wings3D can handle the data demands of
high‑poly projects relatively well. However, autosave becomes inconvenient
due to the blocking behavior of the current saving mechanism. The new save
file manager separates this process, preventing locks and making saving and
autosaving smoother.
I also took in account a comment present in the wings_file:autosave/1:
NOTE: Thanks to @rv3 and @unity for suggest this kind of stuff at Discord.