Loading ...
Sorry, an error occurred while loading the content.

Re: Performance problem

Expand Messages
  • ggb2g
    ... Hi, I just want to confirm your problem! I have the same one using Adobe plugin. addChild is working fast but removeChild is extremly slow and hang the
    Message 1 of 11 , Feb 1, 2005
    • 0 Attachment
      --- In svg-developers@yahoogroups.com, "slavaraitsin"
      <slavaraitsin@y...> wrote:
      >
      > Hi,
      > I'm working on a rather big project using SVG as rendering engine.
      > We are facing mayor performance problems when using removeChild java
      > script method to remove or replace a subtree of the SVG DOM.
      > Depending on the number of child nodes the removeChild method gets
      > really slow. We have a subtree with ~8000 child nodes. Removing it
      > with removeChild take more than 90 seconds on a P4 1.7 Ghz with 1GB
      > RAM!!!!
      > We also tried using replaceChild but same problem.
      > Does anybody have the same problems ? Any solution or workaround ???
      >
      > Thank a lot for your help...
      >
      > Slava
      Hi,
      I just want to confirm your problem! I have the same one using Adobe
      plugin. addChild is working fast but removeChild is extremly slow and
      hang the browser, sometime we can believe the browser has crached.
      I am planning to test in Mozilla SVG enable version to see if I have
      the same issue when not using a plugin.
    • Slava Raitsin
      Hi, Can you let me know how it is done on Mozilla? Thanks ... Hi, I just want to confirm your problem! I have the same one using Adobe plugin. addChild is
      Message 2 of 11 , Feb 2, 2005
      • 0 Attachment
        Hi,

        Can you let me know how it is done on Mozilla?

        Thanks

        ggb2g <ggb2g@...> wrote:

        --- In svg-developers@yahoogroups.com, "slavaraitsin"
        <slavaraitsin@y...> wrote:
        >
        > Hi,
        > I'm working on a rather big project using SVG as rendering engine.
        > We are facing mayor performance problems when using removeChild java
        > script method to remove or replace a subtree of the SVG DOM.
        > Depending on the number of child nodes the removeChild method gets
        > really slow. We have a subtree with ~8000 child nodes. Removing it
        > with removeChild take more than 90 seconds on a P4 1.7 Ghz with 1GB
        > RAM!!!!
        > We also tried using replaceChild but same problem.
        > Does anybody have the same problems ? Any solution or workaround ???
        >
        > Thank a lot for your help...
        >
        > Slava
        Hi,
        I just want to confirm your problem! I have the same one using Adobe
        plugin. addChild is working fast but removeChild is extremly slow and
        hang the browser, sometime we can believe the browser has crached.
        I am planning to test in Mozilla SVG enable version to see if I have
        the same issue when not using a plugin.





        -----
        To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
        -or-
        visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
        ----



        ---------------------------------
        Yahoo! Groups Links

        To visit your group on the web, go to:
        http://groups.yahoo.com/group/svg-developers/

        To unsubscribe from this group, send an email to:
        svg-developers-unsubscribe@yahoogroups.com

        Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



        ---------------------------------
        Do you Yahoo!?
        Yahoo! Search presents - Jib Jab's 'Second Term'

        [Non-text portions of this message have been removed]
      • Peter Schonefeld
        ... the same issue when not using a plugin.
        Message 3 of 11 , Feb 2, 2005
        • 0 Attachment
          >>I am planning to test in Mozilla SVG enable version to see if I have
          the same issue when not using a plugin.<<

          Try using the internal the ASV javascript engine as it is based on mozilla's
          js...It will be interesting to hear if there is any improvement.

          http://wiki.svg.org/index.php/AsvJavaScriptEngine

          Pete
        • Faisal Javeed
          I have a polyline and i have made a string of the format x,y x,y x,y ..... this is quite a long string having a larger number of coordinates. Now when i call
          Message 4 of 11 , Feb 2, 2005
          • 0 Attachment
            I have a polyline and i have made a string of the format
            x,y x,y x,y .....
            this is quite a long string having a larger number of coordinates. Now
            when i call setAttribute on the points attribute of polyline and give this
            string, the processor takes up to 10 seconds and after 10 seconds the
            polyline can be seen on the screen. (looks like svg plug-in takes 10
            seconds to render such a large polyline)
            Is there anyway to make this any faster.

            I am using a p4 with 512 Mb of ram and IE 6.0 with ASV 3.01.

            Regards

            [Non-text portions of this message have been removed]
          • slavaraitsin
            ... mozilla s ... I did it testing on IE ASV engine works (removeChild) even sligtly slower than internal IE javascript engine. Slava
            Message 5 of 11 , Feb 2, 2005
            • 0 Attachment
              > Try using the internal the ASV javascript engine as it is based on
              mozilla's
              > js...It will be interesting to hear if there is any improvement.
              >
              > http://wiki.svg.org/index.php/AsvJavaScriptEngine

              I did it testing on IE ASV engine works (removeChild) even sligtly
              slower than internal IE javascript engine.

              Slava
            • welkerpaul
              You re right, the asv rendering engine is dead slow. Try to lower demands on viewer: -set xxx-rendering= optimizeSpeed , at least shape- rendering= crispEdges
              Message 6 of 11 , Feb 2, 2005
              • 0 Attachment
                You're right,
                the asv rendering engine is dead slow. Try to lower demands on
                viewer:

                -set xxx-rendering="optimizeSpeed", at least shape-
                rendering="crispEdges" (probably you'll know already;-)

                -asv antialiasing is very expensive, set defaultAntialias="false",
                or use .setDefaultAntialias(false) while updating dom and revert
                to .setDefaultAntialias(true) when finished

                -don't use classes for styling, inline attribs should process
                faster (nasty adice;-)

                -don't use polylines, use paths with relative stroking (lower case
                letter path commands)



                hth

                Paul
                --- In svg-developers@yahoogroups.com, Faisal Javeed <fjaveed@i...>
                wrote:
                > I have a polyline and i have made a string of the format
                > x,y x,y x,y .....
                > this is quite a long string having a larger number of coordinates.
                Now
                > when i call setAttribute on the points attribute of polyline and
                give this
                > string, the processor takes up to 10 seconds and after 10 seconds
                the
                > polyline can be seen on the screen. (looks like svg plug-in takes
                10
                > seconds to render such a large polyline)
                > Is there anyway to make this any faster.
                >
                > I am using a p4 with 512 Mb of ram and IE 6.0 with ASV 3.01.
                >
                > Regards
                >
                > [Non-text portions of this message have been removed]
              • Faisal Javeed
                I added crispEdges and optimizeSpeed to the polyline and the result was that time to display around 5000 points was reduced to a fraction of a second from 4 -
                Message 7 of 11 , Feb 2, 2005
                • 0 Attachment
                  I added crispEdges and optimizeSpeed to the polyline and the result was
                  that time to display around 5000 points was reduced to a fraction of a
                  second from 4 - 5 seconds.
                  About the last point you mentioned

                  -don't use polylines, use paths with relative stroking (lower case
                  letter path commands)

                  Is path faster and also if i use relative (i.e. Lower case letter commands
                  like M 10 10 l 20 30 l 30 20) coordinates will it make the rendering even
                  more fast ???.


                  Regards
                  Faisal Javeed
                  INTECH Process Automation Pvt. Ltd.
                  119-B Tech Society Lahore-54590, Pakistan
                  Cell: 03334241582
                  Voice: +92 42 5427001 (3 lines)
                  Fax: +92 42 5411724
                  Web: www.intechww.com



                  "welkerpaul" <PaulWelker@...>
                  02/02/2005 06:52 PM
                  Please respond to
                  svg-developers@yahoogroups.com


                  To
                  svg-developers@yahoogroups.com
                  cc

                  Subject
                  [svg-developers] Re: Performance problem while setAttribute("points") on
                  polyline





                  You're right,
                  the asv rendering engine is dead slow. Try to lower demands on
                  viewer:

                  -set xxx-rendering="optimizeSpeed", at least shape-
                  rendering="crispEdges" (probably you'll know already;-)

                  -asv antialiasing is very expensive, set defaultAntialias="false",
                  or use .setDefaultAntialias(false) while updating dom and revert
                  to .setDefaultAntialias(true) when finished

                  -don't use classes for styling, inline attribs should process
                  faster (nasty adice;-)

                  -don't use polylines, use paths with relative stroking (lower case
                  letter path commands)



                  hth

                  Paul
                  --- In svg-developers@yahoogroups.com, Faisal Javeed <fjaveed@i...>
                  wrote:
                  > I have a polyline and i have made a string of the format
                  > x,y x,y x,y .....
                  > this is quite a long string having a larger number of coordinates.
                  Now
                  > when i call setAttribute on the points attribute of polyline and
                  give this
                  > string, the processor takes up to 10 seconds and after 10 seconds
                  the
                  > polyline can be seen on the screen. (looks like svg plug-in takes
                  10
                  > seconds to render such a large polyline)
                  > Is there anyway to make this any faster.
                  >
                  > I am using a p4 with 512 Mb of ram and IE 6.0 with ASV 3.01.
                  >
                  > Regards
                  >
                  > [Non-text portions of this message have been removed]





                  -----
                  To unsubscribe send a message to:
                  svg-developers-unsubscribe@yahoogroups.com
                  -or-
                  visit http://groups.yahoo.com/group/svg-developers and click "edit my
                  membership"
                  ----


                  Yahoo! Groups Links
                  To visit your group on the web, go to:
                  http://groups.yahoo.com/group/svg-developers/

                  To unsubscribe from this group, send an email to:
                  svg-developers-unsubscribe@yahoogroups.com

                  Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.


                  [Non-text portions of this message have been removed]
                • welkerpaul
                  Faisal, relative stroking is supposed to process faster. If you suffer from performance problems you re dealing with complex drawings- guessing. In general,
                  Message 8 of 11 , Feb 3, 2005
                  • 0 Attachment
                    Faisal,
                    relative stroking is supposed to process faster. If you suffer from
                    performance problems you're dealing with complex drawings-
                    guessing. In general, since the parsed dom eats up your machines
                    ram, any optimization that reduces your drawings dom memory
                    footprint might be worth thinking twice. Adjusting the coordinate
                    representation to a reasonable resolution is easy. Relative stroking
                    throughout the entire drawing should give you smaller numbers too.
                    Play around with grouping and inheritance for styling: redundant
                    info that gets stripped from the file won't squat in a mem;-)

                    Btw: crispEdges AND optimizeSpeed: it's one or the other

                    Regards

                    Paul

                    --- In svg-developers@yahoogroups.com, Faisal Javeed <fjaveed@i...>
                    wrote:
                    > I added crispEdges and optimizeSpeed to the polyline and the
                    result was
                    > that time to display around 5000 points was reduced to a fraction
                    of a
                    > second from 4 - 5 seconds.
                    > About the last point you mentioned
                    >
                    > -don't use polylines, use paths with relative stroking (lower
                    case
                    > letter path commands)
                    >
                    > Is path faster and also if i use relative (i.e. Lower case letter
                    commands
                    > like M 10 10 l 20 30 l 30 20) coordinates will it make the
                    rendering even
                    > more fast ???.
                    >
                    >
                    > Regards
                    > Faisal Javeed
                    > INTECH Process Automation Pvt. Ltd.
                    > 119-B Tech Society Lahore-54590, Pakistan
                    > Cell: 03334241582
                    > Voice: +92 42 5427001 (3 lines)
                    > Fax: +92 42 5411724
                    > Web: www.intechww.com
                    >
                    >
                    >
                    > "welkerpaul" <PaulWelker@h...>
                    > 02/02/2005 06:52 PM
                    > Please respond to
                    > svg-developers@yahoogroups.com
                    >
                    >
                    > To
                    > svg-developers@yahoogroups.com
                    > cc
                    >
                    > Subject
                    > [svg-developers] Re: Performance problem while setAttribute
                    ("points") on
                    > polyline
                    >
                    >
                    >
                    >
                    >
                    > You're right,
                    > the asv rendering engine is dead slow. Try to lower demands on
                    > viewer:
                    >
                    > -set xxx-rendering="optimizeSpeed", at least shape-
                    > rendering="crispEdges" (probably you'll know already;-)
                    >
                    > -asv antialiasing is very expensive, set defaultAntialias="false",
                    > or use .setDefaultAntialias(false) while updating dom and revert
                    > to .setDefaultAntialias(true) when finished
                    >
                    > -don't use classes for styling, inline attribs should process
                    > faster (nasty adice;-)
                    >
                    > -don't use polylines, use paths with relative stroking (lower
                    case
                    > letter path commands)
                    >
                    >
                    >
                    > hth
                    >
                    > Paul
                    > --- In svg-developers@yahoogroups.com, Faisal Javeed
                    <fjaveed@i...>
                    > wrote:
                    > > I have a polyline and i have made a string of the format
                    > > x,y x,y x,y .....
                    > > this is quite a long string having a larger number of
                    coordinates.
                    > Now
                    > > when i call setAttribute on the points attribute of polyline and
                    > give this
                    > > string, the processor takes up to 10 seconds and after 10
                    seconds
                    > the
                    > > polyline can be seen on the screen. (looks like svg plug-in
                    takes
                    > 10
                    > > seconds to render such a large polyline)
                    > > Is there anyway to make this any faster.
                    > >
                    > > I am using a p4 with 512 Mb of ram and IE 6.0 with ASV 3.01.
                    > >
                    > > Regards
                    > >
                    > > [Non-text portions of this message have been removed]
                    >
                    >
                    >
                    >
                    >
                    > -----
                    > To unsubscribe send a message to:
                    > svg-developers-unsubscribe@yahoogroups.com
                    > -or-
                    > visit http://groups.yahoo.com/group/svg-developers and click "edit
                    my
                    > membership"
                    > ----
                    >
                    >
                    > Yahoo! Groups Links
                    > To visit your group on the web, go to:
                    > http://groups.yahoo.com/group/svg-developers/
                    >
                    > To unsubscribe from this group, send an email to:
                    > svg-developers-unsubscribe@yahoogroups.com
                    >
                    > Your use of Yahoo! Groups is subject to the Yahoo! Terms of
                    Service.
                    >
                    >
                    > [Non-text portions of this message have been removed]
                  • Ryan Christianson
                    I m curious if you can just avoid calling removeChild. Here are some alternatives: - set the display attribute to none this will make it not visible - call
                    Message 9 of 11 , Feb 4, 2005
                    • 0 Attachment
                      I'm curious if you can just avoid calling removeChild.

                      Here are some alternatives:
                      - set the display attribute to "none" this will make it not visible
                      - call appendChild on another element this will remove from current
                      location and put in the new location. You could make a document
                      fragment, call append child on the fragment, then let the js gc
                      collect it:

                      var group = parseXML( '<g xmlns="http://www.w3.org/2000/svg"
                      display="none" />', svgDocument ).firstChild;
                      group.appendChild( childToDelete );
                      group = null;

                      after that, the javascript garbage collector should collect it when it
                      feels like it.

                      If this solves your problem let me know, I'm curious!

                      Ryan





                      On Wed, 02 Feb 2005 09:54:40 -0000, slavaraitsin <slavaraitsin@...> wrote:
                      >
                      >
                      > > Try using the internal the ASV javascript engine as it is based on
                      > mozilla's
                      > > js...It will be interesting to hear if there is any improvement.
                      > >
                      > > http://wiki.svg.org/index.php/AsvJavaScriptEngine
                      >
                      > I did it testing on IE ASV engine works (removeChild) even sligtly
                      > slower than internal IE javascript engine.
                      >
                      > Slava
                      >
                      >
                      > -----
                      > To unsubscribe send a message to: svg-developers-unsubscribe@yahoogroups.com
                      > -or-
                      > visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
                      > ----
                      > Yahoo! Groups Links
                      >
                      >
                      >
                      >
                      >
                    Your message has been successfully submitted and would be delivered to recipients shortly.