Now that all the other junk is being dropped from the file, script info
lines are the only thing left which was a concrete AssEntry, and
AssEntry wasn't actually a very good way to store them.
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.
This eliminates the need to explicitly delete the parsed blocks.
Also go ahead and remove AssDialogue::Blocks since it's really not a
very good idea in general.
It is very unlikely that anyone has ever actually used ASS2 for
anything, and in practice it was not usable anyway as the bottom margin
was always either ignored or blindly overwritten.
Despite special-casing zero-length input, wxString("") takes over four
times as long as wxString() - and on a 10k line script, this change cuts
AssFile's copy constructor's runtime in half.
Originally committed to SVN as r6401.
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.
Rather than going through a ton of work to ensure that every AssEvent
has a sensible start time that happens to leave it in the right place
after sorting, simply sort only consecutive blocks of AssDialogues and
leave everything else untouched. Note that this results in different
behavior when there are multiple [Events] sections in a file -- rather
than moving lines between sections and keeping the number of lines per
section constant, each section keeps the lines it had.
As it's now easy to do, also add sorting by style name and end time.
Closes#614.
Originally committed to SVN as r4307.
* Wrapping all headers that are in agi_pre.h with AGI_PRE.
* Sorting alphabetically.
* Same operation as r3515.
Note: This is broken when precompiled headers are not in use, I'll fix that after this commit so the two changes don't get jumbled up.
Originally committed to SVN as r3525.
* Sort wx headers and wrap with #ifndef WX_PRE.
* Add missing heade rto stdwx.h.
M src/ass_attachment.h
M src/subs_grid.cpp
M src/ass_dialogue.cpp
M src/ass_attachment.cpp
M src/aegisub_endian.h
M src/audio_display.cpp
M src/audio_karaoke.cpp
M src/dialog_kara_timing_copy.cpp
M src/ass_dialogue.h
M src/text_file_writer.cpp
M src/stdwx.h
Originally committed to SVN as r3503.
Document all functions, class, struct, union, enum, macro, variable, typedefs. This isn't the actual document in itself but empty documentation using any old documentation if it was there.
This was done using exuberant ctags to get tag info, then a TCL script to parse/remove old comments and convert them into Doxygen-style.
Some notes:
* Anything labeled 'DOCME' needs to be documented, @param and @return have been left blank as it would be annoying to delete the 'DOCME' from every one of those.
* Some multiline comments may have been munged into single line comments
* Leave the /// comments above global variables with a space, if they're harder to read then we'll be less likey to use them.
* Enum comments can go after the enumeration itself '[value] /// comment'
* include/aegisub/*.h haven't been converted yet, this will be done in a later commit
* Some documentation blocks are in the wrong place, in the .h when it should be in the .cpp, or vice versa.
See http://devel.aegisub.org/wiki/Doxygen for some details on Doxygen and a 'style guide'.
Originally committed to SVN as r3312.
* Swap old email + website address with 'Aegisub Project http://www.aegisub.org/'
* Set categories for all files (jfs)
* Add descriptions for each file (jfs)
* Add $Id$ keyword
Originally committed to SVN as r3310.