[JW Lua] And another performance killer: FCEntryMetrics below a one-bar repeat staff style

Jan Angermüller jan at angermueller.com
Thu Sep 10 21:27:52 CEST 2015


Hi Jari,

and here is another one of the same kind.
FCEntryMetrics:Load(entry) also takes about 0.370s on a measure with 24 
note entries below a one-bar repeat staff style, but only 0.07s without 
normal, slash, rhythmic or blank notation. That means getting the 
entrymetrics of 30 one-bar repeat measures where no note entry is 
visible, takes again 11 seconds.

local entrymetrics=finale.FCEntryMetrics()
for entry in eachentry(finenv.Region()) do
    local e=entrymetrics:Load(entry)
end

If you add the CalcWidestNoteheadWidth() from the other mail, it takes 
0.720 per measure or about 20 seconds (!) on 30 measures for this simple 
script:

local entrymetrics=finale.FCEntryMetrics()
for entry in eachentry(finenv.Region()) do
    local e=entrymetrics:Load(entry)
    local n=entry:CalcWidestNoteheadWidth()
end

I have tested both scripts on several very different documents and the 
relation between normal notation and one-bar repeat is always a factor 
of about 6. I also had documents that were faster on 24 noteheads, but 
the factor always remained the same.

All the best,
Jan




More information about the JWLua mailing list