> As an example, a typical dynamic page which executes several hundred lines of
> Active 4D scripts by the time it ultimately completes takes a 7-8% percent
> performance hit just by adding 9 calls to "fusebox.head.addMetaTag".
That I find very hard to believe. I tried this:
$t := milliseconds
for ($i; 1; 500)
fusebox.head.addMetaTag($fusebox; "http-equiv=\"X-UA-Compatible\"
content=\"chrome=1\"")
end for
write(milliseconds - $t)
I get on average about 210 ms for 500 calls, including looping overhead. So
we're looking at 500 *nanoseconds* per call. No way that is the performance
sink.
> Likeways, I have a 'poor man's class' of my own which has about 20-30
> assignment calls of the form $myClass->set("sortorder";1). My 20-30 calls
> take another 10% out of the capacity.
That is an even crazier. What are you doing in set()? I tried this:
method "new"
$self := new global collection
$self{"__class__"} := current library name
$self{"_dict"} := new global collection
return ($self)
end method
method "set"($self; $key; $value)
$self{"_dict"}{$key} := $value
end method
$obj := mylib.new
$t := milliseconds
for($i; 1; 500)
$obj->set("sortOrder"; 1)
end for
write(milliseconds - $t)
I get on average about 28 milliseconds for 500 iterations, or about
>
> So the 9 calls to fusebox.head.addMetaTag and the 20-30 calls to my
> poor-man's class together account for the best part of a 20% overall
> performance reduction (Measured in pages per minute served) at high loads.
>
> The thing is, those tools are some of the most powerful in the whole Active4D
> inventory, so I won't be ditching them any time soon unless my customer finds
> the performance unacceptable (which they don't at the moment).
>
> If this seems reasonable, given what's going on inside those classes, then
> I'll simply use those functions sparingly.
>
> Regards
>
> Peter
>
> _______________________________________________
> Active4D-dev mailing list
> [email protected]
> http://list.aparajitaworld.com/listinfo/active4d-dev
> Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/
Regards,
Aparajita
_______________________________________________
Active4D-dev mailing list
[email protected]
http://list.aparajitaworld.com/listinfo/active4d-dev
Archives: http://vasudev.aparajitaworld.com/archive/active4d-dev/