Use boost::filesystem::path for all paths, and std::string for all other
strings, converting to/from wxString as close to the actual uses of wx
as possible.
Where possible, replace the uses of non-UI wxWidgets functionality with
the additions to the standard library in C++11, or the equivalents in
boost.
Move the path token management logic to libaegisub (and rewrite it in
the process).
Add a basic thread pool based on asio and std::thread to libaegisub.
This touches nearly every file in the project and a nontrivial amount of
code had to be rewritten entirely, so there's probably a lot of broken
stuff.
Nearly all of the files including main.h are doing so only for OPT_GET
and friends, which are rather unrelated to the main things that main.h
declares.
100 no-op non-amend commits on a subtitle file with 6689 dialogue lines,
with the undo limit set to 100:
Without flyweight:
No video open:
Initial memory usage: 30.6 MB
Final memory usage: 498.0 MB
Elapsed time: 6.3 seconds
Video open, using libass:
Initial memory usage: 54.3 MB
Final memory usage: 653.3 MB
Elapsed time: 23.7 seconds
With flyweight:
No video open:
Initial memory usage: 26.0 MB
Final memory usage: 104.5 MB
Elapsed time: 3.0 seconds
Video open, using libass:
Initial memory usage: 46.7 MB
Final memory usage: 251.8 MB
Elapsed time: 13.0 seconds
No video open:
Memory usage: -79%
Time: -52%
Video open:
Memory usage: -61.5%
Time: -45%
100 no-op amend commits on a line in the middle of a subtitle file with
6689 dialogue lines, with video open:
Without flyweight:
Initial memory usage: 48.2 MB
Final memory usage: 182.3 MB
Elapsed time: 22.3 seconds
With flyweight:
Initial memory usage: 39.8 MB
Final memory usage: 165.8 MB
Elapsed time: 13.8 seconds
Note: The large jump in memory usage here is due to that the benchmark
is blocking the main thread, so at the end there are ~100 video frames
waiting to be displayed.
I'm not sure if this fixes any current actual problems as using slightly
stale data is normally only a problem when lines are being deleted, but
it's easier to fix it across the board than to figure out where it is
and isn't needed, and the speed impact of batching is trivial.
Originally committed to SVN as r6753.
Rather than everything having to separately commit changes to the ass
and then tell the subs grid to notify various parts of Aegisub about the
changes, committing the AssFile now triggers an event which objects
listen for.
AssFile::Commit now also has an argument to indicate what sorts of
changes were made to the file. For now these types are very broad.
Originally committed to SVN as r4901.
This happens to fix most of the undo issues, as it's now much harder to
have uncommitted changes to the file.
Closes#355 and #586.
Originally committed to SVN as r4699.
Make the undo and redo stacks non-static members of AssFile, making it
theoretically possible to have multiple open AssFiles with working undo.
Slightly improve tracking of whether the file is modified: saving,
making a change, then undoing the change now results in the file being
shown as unmodified as with most programs with undo.
Add basic undo coalescing support.
Originally committed to SVN as r4667.