<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi Jari,<br>
<br>
I noticed a strange "slow motion" calculation when performing
FCNoteEntry:CalcWidestNoteheadWidth() on a measure with a "one-bar
repeat" staff style, i.e. where the noteheads are not visible.<br>
<br>
This is the simple script:<br>
<br>
for entry in eachentry(finenv.Region()) do<br>
local n=entry:CalcWidestNoteheadWidth()<br>
end<br>
<br>
When running this script on one measure with 24 noteheads, it takes
0.067s for a measure without a staff style and 0.368 (!) seconds if
none of the noteheads is visible as it is hidden beyond the<b>
one-bar repeat staff style</b>. So if you take 30 one-bar repeat
measures, it sums up to <b>11 seconds</b> (!) for calculating 720
notehead widths on a fast PC.<br>
My current workaround is: if some entrymetrics properties return 0
(i.e. the position can't be calculated as it is hidden), then don't
calculate the notehead width. <br>
But probably you will find a better internal solution.<br>
<br>
The same goes for the<b> two-bar repeat and blank notation with
empty rests </b>staff styles.<br>
The other alternate notations work fine (i.e. 0.067s calculating
time for slash, rhythmic and blank notation).<br>
<br>
All the best,<br>
Jan<br>
<br>
</body>
</html>