-
Notifications
You must be signed in to change notification settings - Fork 293
Description
Hey guys,
@Jose-Moreno @candyface @scribblemaniac @J5lx @feeef @Kaikogf @gordielachance
In the days of waiting for 0.6 official release, it's time to discuss what we can do next in 0.6.x patches.
This roadmap will more focus on stability, robustness and performance issues. I would like to put new features into 0.7 rather than a 0.6.x patch. Still, any suggestion/discussion are welcomed.
0.6.1 Reduce memory usage
Currently, Pencil2d keeps all frames in RAM while loading a project. The upside is obvious, it's simple, efficient and intuitive to program. But on the other hand, the downside is obvious, too. It consumes a lot of memory. For example, a 200-frame animation may take up to 1.6GB ram if every frame is in full size of 1920x1080 (8MB ram each). The total memory consumption is considerable.
We've heard some cases said Pencil2D became very unstable after creating more than 700 frames. I suspect that's because Pencil2D has used up all the available RAM. Especially on a 32bit system, the limit of RAM is more restricted (on a 32bit Windows it's only 1.5GB per process as I know).
So the plan is to use the disk as much as possible. Pencil2D will keep maybe only 10 or 20 active frames beside the current frame and save all other frames to disk. I might use methods like LRU to decide which frames Pencil2D should keep, but the main idea is to reduce the number of active frames in RAM. It may cause a sudden short pause in a long frame jump (e.g. jump from frame 1 to frame 100) due to the disk loading time of images, but we'll see.
Related issues: #253 #520 #574
0.6.2 Crash recovery
Another advantage of writing frames to disk is, it will be easier to implement a decent crash recovery since almost all frames will not get lost when pencil2d accidentally crashes.
At the moment Pencil2D creates a temporary workspace in system's temp folder while loading a project. (The temporary workspace can be thought of as an uncompressed pclx) The temporary workspace will be wipe out when Pencil2D exits normally. So if there is something left, it means Pencil2D was not properly closed last time. And then we can try to restore the project in the next start.
Related issues: #782
0.6.3 Stroke performance
The issue has been long recognized but hasn't been resolved yet. There are some inefficient operations when Pencil2d handles pen strokes.
Ideally, we can try our best to reach the standard of some basic level WACOM tablet, which is 133 points per second. That means we have only 7 milliseconds to handle every mouse/tablet event.
As I mentioned in the previous link, there are 2 parts we can improve: the first is minimize the repaint area when users are drawing. (This might have been done but I'll double check it)
The second is preventing image copying during a stroke. According to a comment from @candyface, image copying happens more than 20 times in a single stroke, which is very inefficient.
While I'm working on this, I will refactor the code structure to be better suited to the mypaint brush lib integration which is in the plan of 0.7.
Translation
The online translation platform will move to Transifex as @J5lx suggested in #505. Please tell your friends or anyone who is still on OneSky, time to move to Transifex. The old OneSky site will be deprecated soon. (@Kaikogf I saw you there sometimes?) I will do a sync in a few days and close OneSky project.
Forum
Probably needs to think about whether to move to the new forum built by @J5lx. I'll create another thread to discuss it later.
Internal code changes
-
Replace the current compression library with a more lightweight zip library called miniz. It will give us a more reasonable project structure, also resolve the request of please allow using system zlib #530. Plus a simpler software license (maybe!) after getting rid of zlib & Quazip. But a compatibility and performance test is required.
-
Migrate our Unit Test Framework from Qt Test lib to Catch2. As I have been aware of some limitations of Qt Test lib, I will give Catch2 a go. It is also very lightweight (only 1 .hpp file) so that I can easily include it without a pain of library integration on all supported platforms. And hope the tests can reduce the workload of our beta testers. You can check the progress in this branch.