[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [DotGNU]performance test / SWF ?
From: |
Rhys Weatherley |
Subject: |
Re: [DotGNU]performance test / SWF ? |
Date: |
Thu, 09 Oct 2003 19:28:08 +1000 |
User-agent: |
KMail/1.4.3 |
On Thursday 09 October 2003 07:21 pm, Thomas Fritzsche wrote:
> Maybe this is a general problem with my dotgnu version. To check this I
> post here my PNetMark results. (CVS 03.10.2003/AMD
> +3000/512MB/NForce2/ATI-Radeon 9500 Pro)
>
> Are this good or bad results??
Pretty good, I'd say, for such a high-powered AMD system. But the PNetMark
only tests certain compute-bound aspects.
I'm starting to suspect that the slowdown is related to garbage collection to
some degree. To measure a string, it is necessary to break it up into
sections at word/character boundaries and process the sections.
Creating all those itty bitty strings and then passing them to
"Xsharp.Graphics.MeasureString" is likely to have a big impact on the garbage
collector. To confirm, you could put a counter in the "AllocString" function
(pnet/engine/lib_string.c) and see how often it gets called.
There are several ways this could be addressed. First, try to reduce the
number of calls to string measurement/drawing by being cleverer about what
you pass to the lower-level API's. The longer a string section you can pass
in one hit, the better.
Second, investigate modifying the toolkit API so that it passes "string,
offset, count" instead of just "string". That way, you won't need to create
a new string object to measure or draw a sub-range.
The less method calls you make, and the less temporary objects that you
create, the better off you'll be overall.
Cheers,
Rhys.