I think if you run our profiler, you'll get more meaningful results.

Max ran it and attached the results to 
http://jira.openlaszlo.org/jira/browse/LPP-8016

Max noticed that getTextDimension was a heavy hitter, and he was looking at it last night to see if there were any possible improvements.

We also know that the CSS style bindings are heavily used, which was the point of a big optimization pass I did on that a while ago. styleBindAttr is what gets run when you have a $style constraint.

Something we talked about in the past is trying to coalesce all constraints into a single method and apply them all at once. But that idea runs afoul of the fact that each attribute can have its own pattern of inheritance and overriding, which in many case cannot be determined until runtime, so we've never gotten far with that idea.

As soon as I finish with http://jira.openlaszlo.org/jira/browse/ LPP-8119 I plan to look more closely at the profiler output.

On 2009-04-30, at 13:18EDT, Henry Minsky wrote:

Here's something a little odd, when I did a profile run again, the top two
times (10% each)  were spent ingetTextDimension in a function with no
printed name but it said line 648 of the LFC:

var $4=this["__LZPropertyCache"]|| LzCSSStyle.getPropertyCache(this);var
$6=$4[$2];if(typeof
$6=="string"&&$6.length>2&&$6.indexOf("0x")==0&&!isNaN($6)){

Which I think corresponds to this line in LzNode

 function __LZstyleBindAttribute(attr, prop, type) {
   // Inlined version of LzCSSStyle.getPropertyValueFor
   // Get the property cache for this node
var pc = this['__LZPropertyCache'] || LzCSSStyle.getPropertyCache(this);

On Thu, Apr 30, 2009 at 11:30 AM, Henry Minsky <[email protected] >wrote:

I did a run of the Firebug profiler on the startup of the mail DHTML app
(see comment
in http://www.openlaszlo.org/jira/browse/LPP-8016).

This is what the profiler says, I'm going to do a run with debug=true to
see if I can tell more easily what the
anonymous functions really are.




Function Calls Percent Own Time Time Avg Min Max File
getTextDimension() 1259 11.03% 352.998ms 357.224ms 0.284ms 0.004ms
23.925ms LFCdhtml.js (line 2490)
__getImage() 240 5.93% 189.84ms 189.84ms 0.791ms 0.184ms 2.751ms LFCdhtml.js
(line 2097)
(?)() 400 3.72% 119.02ms 135.106ms 0.338ms 0.134ms 34.493ms LFCdhtml.js
(line 8940)
make() 1671 3.4% 108.932ms 358.124ms 0.214ms 0.057ms 3.675ms LFCdhtml.js
(line 45)
addProperty() 13969 2.75% 88.02ms 157.337ms 0.011ms 0.007ms 0.078ms LFCdhtml.js
(line 41)
(?)() 1311 2.58% 82.669ms 367.822ms 0.281ms 0.005ms 2.665ms LFCdhtml.js
(line 724)
(?)() 3903 2.51% 80.233ms 139.118ms 0.036ms 0.006ms 0.225ms LFCdhtml.js
(line 1156)
nc() 11681 2.35% 75.244ms 1726.595ms 0.148ms 0.007ms 152.232ms LFCdhtml.js
(line 57)
(?)() 1295 2.28% 73.102ms 1562.6ms 1.207ms 0ms 152.202ms LFCdhtml.js (line
584)
1() 14227 2.21% 70.746ms 70.746ms 0.005ms 0.001ms 0.07ms LFCdhtml.js (line
13)
(?)() 10295 2.14% 68.585ms 71.191ms 0.007ms 0ms 0.144ms LFCdhtml.js (line
71)
copyBrowserXML() 23 2.07% 66.256ms 83.1ms 3.613ms 0.139ms 48.181ms LFCdhtml.js
(line 3114)
addChildSprite() 695 1.84% 58.813ms 91.562ms 0.132ms 0.05ms 6.046ms LFCdhtml.js
(line 1676)
setSource() 362 1.56% 50.024ms 158.026ms 0.437ms 0.081ms 2.212ms LFCdhtml.js
(line 1721)
(?)() 194 1.56% 49.867ms 419.259ms 2.161ms 0.007ms 151.68ms LFCdhtml.js
(line 8065)
LzSprite() 613 1.54% 49.35ms 49.35ms 0.081ms 0.003ms 0.602ms LFCdhtml.js
(line 1535)
LzInheritedHash 2951 1.41% 45.199ms 45.199ms 0.015ms 0ms 0.159ms LFCdhtml.js
(line 441)
setVisible() 1095 1.41% 45.15ms 45.15ms 0.041ms 0ms 0.21ms LFCdhtml.js
(line 1918)
setHeight() 1576 1.41% 45.115ms 71.042ms 0.045ms 0ms 0.253ms LFCdhtml.js
(line 1903)
(?)() 3663 1.38% 44.13ms 163.489ms 0.045ms 0.009ms 0.239ms LFCdhtml.js
(line 1129)
setWidth() 1561 1.32% 42.171ms 59.728ms 0.038ms 0ms 0.607ms LFCdhtml.js
(line 1886)
(?)() 2908 1.3% 41.524ms 55.38ms 0.019ms 0.014ms 0.199ms LFCdhtml.js (line
1202)
__updateStretches() 732 1.25% 40.133ms 40.133ms 0.055ms 0.001ms 0.164ms LFCdhtml.js
(line 2142)
setY() 804 1.22% 38.933ms 41.295ms 0.051ms 0.001ms 0.099ms LFCdhtml.js
(line 1897)
(?)() 563 1.2% 38.403ms 121.381ms 0.216ms 0.008ms 1.342ms LFCdhtml.js
(line 845)
(?)() 1475 1.15% 36.874ms 36.951ms 0.025ms 0.003ms 0.174ms LFCdhtml.js
(line 1085)
__setZ() 740 1.09% 34.772ms 34.772ms 0.047ms 0.03ms 0.22ms LFCdhtml.js
(line 2241)
getLineHeight() 1273 1.06% 34.007ms 176.376ms 0.139ms 0.015ms 17.701ms LFCdhtml.js
(line 2470)


--
Henry Minsky
Software Architect
[email protected]





--
Henry Minsky
Software Architect
[email protected]

Reply via email to