[JW Lua] FCArticulation:CalcFlippedSymbolUsed very slow on hidden articulations

Jan Angermüller jan at angermueller.com
Fri Feb 2 09:09:49 CET 2018


Jari,

when I call FCArticulation:CalcFlippedSymbolUsed on hidden articulations 
(i.e. "Show" unchecked on the articulation), it takes the processing 
speed is decreased by a factor of 10. It gets worse when a hide 
articulation staff style is used.
Articulations in "Show" state: ca. 0.015s
Articulations in "Hide" state: ca. 0.145s
Articulations in "Show" state, but with a "Hide Articulations Staff 
Style": ca. 0.155s
Articulations in "Hide" state, but with a "Hide Articulations Staff 
Style": ca. 0.166s

Calculated with this script and the attached document
(to calculate the "Show" state select all articulations and check "Show"):
for i=1,10,1 do
     for e in eachentry(finenv.Region()) do
         local arts=e:CreateArticulations()
         for a in each(arts) do
             local flipped=a:CalcFlippedSymbolUsed()
         end
     end
end

I was recently working on a huge score where this calculation only took 
more than a minute, because of many hidden articulations. My current 
workaround is to ignore all articulations that are set to Visible=false.

I don't know how you this solved in your code. Do you have to manually 
make them visible, update the metrics and then do the calculation? This 
would explain the calculation time.
BTW, the same goes for CalcMetricPos if the articulation is invisible.

Best,
Jan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180202/2f868180/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: calcflippedsymbolused.musx
Type: application/octet-stream
Size: 47976 bytes
Desc: not available
URL: <http://jwmusic.nu/pipermail/jwlua_jwmusic.nu/attachments/20180202/2f868180/attachment-0001.obj>


More information about the JWLua mailing list