Fixes a (small, I think) TMW->Unicode performance glitch. I was
inserting 5 characters at a time and then skipping ahead just one position. I don't think this affected correctness. I believe there's still a terrible (exponential?) slowdown as the input file gets bigger, however. Perhaps not -- but we run through the first 1000 TMW glyphs in 6 seconds, the 20th thousand takes at least 60 seconds. Is TMW->Wylie faster than TMW->Unicode? If so, why? Thought: don't use a DuffPane within TibetanConverter -- it can only add overhead, right? My hprof profile said that the conversion was taking just a couple of percent of the work; the rest was going to display-related stuff that you should only see if you were displaying the document. I'm not!
This commit is contained in:
parent
dfe64a1927
commit
6540b260bd
1 changed files with 1 additions and 0 deletions
|
@ -735,6 +735,7 @@ public class TibetanDocument extends DefaultStyledDocument {
|
|||
if (replaceInsteadOfInserting()) {
|
||||
if (toUnicode) {
|
||||
replaceDuffWithUnicode(fontSize, i, unicode);
|
||||
i += unicode.length() - 1; // we do i++ below
|
||||
} else {
|
||||
replaceDuff(fontSize, i, equivalent[0], !toTM);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue