Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Harald Ulriksen 207 posts 249 karma points
    Jul 07, 2011 @ 08:33
    Harald Ulriksen
    0

    Memory leak

    After generating a few pdf files the w3wp process starts using quite a lot of memory. Easily hitting above 1 gigabyte.

    This seems to be related to the IBEX generator holding on to byte arrays. A look at the IIS process using Red Gate ANTS memory profiler shows that IIS is holding a lot of byte arrays in memory as well as some RenderedObject.

    Looking at what's keeping the byte classes in memory there's two paths, one back to InternalFODocument

    and one back to PageTree

    Can you please look at disposal and release of objects.

    The full xslt file is available upon request, in short it use external-graphic loaded through image gen. The images are from a MultiNodePicker.

     <xsl:template name ="HeaderImages">
    <xsl:param name="images"/>

    <xsl:if test="count($images) &gt; 0">
    <xsl:variable name="dpi">120</xsl:variable>
    <xsl:variable name="mmToInches" select="1 div 2.54" />

    <xsl:variable name="widthMm" select="round(160 div count($images))" />
    <xsl:variable name="widthPixels" select="round($widthMm * $dpi * $mmToInches div 10)" />
    <xsl:variable name="heightMm" select="50" />
    <xsl:variable name="heightPixels" select="round($heightMm * $dpi * $mmToInches div 10)"/>

    <!-- <fo:block>
    Cm to Inches: <xsl:value-of select="$mmToInches" />
    Width: <xsl:value-of select="$widthMm"/>
    Width Pixels: <xsl:value-of select="$widthPixels"/>
    Height: <xsl:value-of select="$heightMm" />
    Height Pixels: <xsl:value-of select="$heightPixels" />

    Site root: <xsl:value-of select="$siteRoot"/>
    Web root: <xsl:value-of select="$webRoot" />
    </fo:block>-->
    <xsl:for-each select="$images">
    <xsl:variable name="media" select="umbraco.library:GetMedia(., 0)" />

    <xsl:variable name="imageUrl" select="concat('http://',$siteRoot,'/imagegen.ashx?image=',$media/umbracoFile,'&amp;width=',$widthPixels,'&amp;height=',$heightPixels,'&amp;crop=resize')"/>

    <!-- <xsl:value-of select="$image2" />-->
    <fo:external-graphic src="url({$imageUrl})"
    margin="0"
    padding="0"/>

    </xsl:for-each>

    </xsl:if>

    </xsl:template>

     

  • Darren Ferguson 1022 posts 3259 karma points MVP c-trib
    Jul 07, 2011 @ 08:39
    Darren Ferguson
    0

    Hi Harald, Could you please mail over your complete XSLT file so that I can try and reproduce locally.

    Thanks.

    Darren.

Please Sign in or register to post replies

Write your reply to:

Draft