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

Charting drawing time

Expand Messages
  • bobstachel
    Wondering about performance of charting in YUI 2.7: We have a line chart with 12 data series. It draws in about 3 seconds on Firefox, 4 seconds in IE8, and 15
    Message 1 of 5 , Nov 18, 2009
    • 0 Attachment
      Wondering about performance of charting in YUI 2.7:

      We have a line chart with 12 data series. It draws in about 3 seconds on Firefox, 4 seconds in IE8, and 15 seconds in IE7. Well, we are all used to IE7 being unbearably slow, but wait a second, the chart is a Flash component. Isn't it the same code running in all of the browsers? (I did make sure that each browser was up-to-date with the latest Flash player.)

      Well, the drawing time is proportional to the number of points in the chart. That is also what one would expect. However...

      I had a chart with 905 numeric data points (spread over the 12 data series). Inspection of the data showed that for many of these points, the y-value was the same value as the previous point (in other words, there were many segments of each series where the line was flat).

      So I removed these redundant points and added the series style attributes {connectDiscontinuousPoints: true, discontinuousDashLength: 1}, so that the chart would fill in the removed points instead of the points being supplied by the data series.

      Now, my chart had only 219 points instead of the original 905. But the drawing time was almost exactly the same. I would have expect it to take about 1/4 of the time.

      I should add that I am using a JavaScript array as my data source.

      Any guidance or information is much appreciated.
    • tripp.bridges
      That sounds like a lot of data for a single chart. That may be the cause of the slowness that you are experiencing. If you can post a link that reproduces the
      Message 2 of 5 , Nov 19, 2009
      • 0 Attachment
        That sounds like a lot of data for a single chart. That may be the cause of the slowness that you are experiencing. If you can post a link that reproduces the isssue, I'll be happy to check it out and see if there is anything that can be done to improve the performance.

        Tripp

        --- In ydn-javascript@yahoogroups.com, "bobstachel" <bob.stachel@...> wrote:
        >
        > Wondering about performance of charting in YUI 2.7:
        >
        > We have a line chart with 12 data series. It draws in about 3 seconds on Firefox, 4 seconds in IE8, and 15 seconds in IE7. Well, we are all used to IE7 being unbearably slow, but wait a second, the chart is a Flash component. Isn't it the same code running in all of the browsers? (I did make sure that each browser was up-to-date with the latest Flash player.)
        >
        > Well, the drawing time is proportional to the number of points in the chart. That is also what one would expect. However...
        >
        > I had a chart with 905 numeric data points (spread over the 12 data series). Inspection of the data showed that for many of these points, the y-value was the same value as the previous point (in other words, there were many segments of each series where the line was flat).
        >
        > So I removed these redundant points and added the series style attributes {connectDiscontinuousPoints: true, discontinuousDashLength: 1}, so that the chart would fill in the removed points instead of the points being supplied by the data series.
        >
        > Now, my chart had only 219 points instead of the original 905. But the drawing time was almost exactly the same. I would have expect it to take about 1/4 of the time.
        >
        > I should add that I am using a JavaScript array as my data source.
        >
        > Any guidance or information is much appreciated.
        >
      • bobstachel
        I appreciate the offer of help. I know it is a lot of data. My main question was why should a Flash component run more slowly in IE7 than FF. I suppose the
        Message 3 of 5 , Nov 20, 2009
        • 0 Attachment
          I appreciate the offer of help. I know it is a lot of data.

          My main question was why should a Flash component run more slowly in IE7 than FF. I suppose the answer lies in how often the Flash-Javascript API is called. Then the question is whether the type of data source for the chart makes any difference.

          bob stachel

          --- In ydn-javascript@yahoogroups.com, "tripp.bridges" <trippb@...> wrote:
          >
          > That sounds like a lot of data for a single chart. That may be the cause of the slowness that you are experiencing. If you can post a link that reproduces the isssue, I'll be happy to check it out and see if there is anything that can be done to improve the performance.
          >
          > Tripp
          >
          > --- In ydn-javascript@yahoogroups.com, "bobstachel" <bob.stachel@> wrote:
          > >
          > > Wondering about performance of charting in YUI 2.7:
          > >
          > > We have a line chart with 12 data series. It draws in about 3 seconds on Firefox, 4 seconds in IE8, and 15 seconds in IE7. Well, we are all used to IE7 being unbearably slow, but wait a second, the chart is a Flash component. Isn't it the same code running in all of the browsers? (I did make sure that each browser was up-to-date with the latest Flash player.)
          > >
          > > Well, the drawing time is proportional to the number of points in the chart. That is also what one would expect. However...
          > >
          > > I had a chart with 905 numeric data points (spread over the 12 data series). Inspection of the data showed that for many of these points, the y-value was the same value as the previous point (in other words, there were many segments of each series where the line was flat).
          > >
          > > So I removed these redundant points and added the series style attributes {connectDiscontinuousPoints: true, discontinuousDashLength: 1}, so that the chart would fill in the removed points instead of the points being supplied by the data series.
          > >
          > > Now, my chart had only 219 points instead of the original 905. But the drawing time was almost exactly the same. I would have expect it to take about 1/4 of the time.
          > >
          > > I should add that I am using a JavaScript array as my data source.
          > >
          > > Any guidance or information is much appreciated.
          > >
          >
        • tripp.bridges
          If you are doing a lot of processing in js to create your datasource or if you are making an xhr request to get it, it could make an impact. Also, if you are
          Message 4 of 5 , Nov 20, 2009
          • 0 Attachment
            If you are doing a lot of processing in js to create your datasource or if you are making an xhr request to get it, it could make an impact. Also, if you are using axis label functions, the communication between the dom and flash player could create a bottleneck. Without an actual repro case, it is hard to tell.

            Tripp
            --- In ydn-javascript@yahoogroups.com, "bobstachel" <bob.stachel@...> wrote:
            >
            > I appreciate the offer of help. I know it is a lot of data.
            >
            > My main question was why should a Flash component run more slowly in IE7 than FF. I suppose the answer lies in how often the Flash-Javascript API is called. Then the question is whether the type of data source for the chart makes any difference.
            >
            > bob stachel
            >
            > --- In ydn-javascript@yahoogroups.com, "tripp.bridges" <trippb@> wrote:
            > >
            > > That sounds like a lot of data for a single chart. That may be the cause of the slowness that you are experiencing. If you can post a link that reproduces the isssue, I'll be happy to check it out and see if there is anything that can be done to improve the performance.
            > >
            > > Tripp
            > >
            > > --- In ydn-javascript@yahoogroups.com, "bobstachel" <bob.stachel@> wrote:
            > > >
            > > > Wondering about performance of charting in YUI 2.7:
            > > >
            > > > We have a line chart with 12 data series. It draws in about 3 seconds on Firefox, 4 seconds in IE8, and 15 seconds in IE7. Well, we are all used to IE7 being unbearably slow, but wait a second, the chart is a Flash component. Isn't it the same code running in all of the browsers? (I did make sure that each browser was up-to-date with the latest Flash player.)
            > > >
            > > > Well, the drawing time is proportional to the number of points in the chart. That is also what one would expect. However...
            > > >
            > > > I had a chart with 905 numeric data points (spread over the 12 data series). Inspection of the data showed that for many of these points, the y-value was the same value as the previous point (in other words, there were many segments of each series where the line was flat).
            > > >
            > > > So I removed these redundant points and added the series style attributes {connectDiscontinuousPoints: true, discontinuousDashLength: 1}, so that the chart would fill in the removed points instead of the points being supplied by the data series.
            > > >
            > > > Now, my chart had only 219 points instead of the original 905. But the drawing time was almost exactly the same. I would have expect it to take about 1/4 of the time.
            > > >
            > > > I should add that I am using a JavaScript array as my data source.
            > > >
            > > > Any guidance or information is much appreciated.
            > > >
            > >
            >
          • Joylyn Gustilo
            No read ... From: bobstachel Sent: Thursday, 19 November 2009 10:39 AM To: ydn-javascript@yahoogroups.com Subject: [ydn-javascript]
            Message 5 of 5 , Dec 10, 2009
            • 0 Attachment
              No read


              From: bobstachel <bob.stachel@...>
              Sent: Thursday, 19 November 2009 10:39 AM
              To: ydn-javascript@yahoogroups.com
              Subject: [ydn-javascript] Charting drawing time

               

              Wondering about performance of charting in YUI 2.7:

              We have a line chart with 12 data series. It draws in about 3 seconds on Firefox, 4 seconds in IE8, and 15 seconds in IE7. Well, we are all used to IE7 being unbearably slow, but wait a second, the chart is a Flash component. Isn't it the same code running in all of the browsers? (I did make sure that each browser was up-to-date with the latest Flash player.)

              Well, the drawing time is proportional to the number of points in the chart. That is also what one would expect. However...

              I had a chart with 905 numeric data points (spread over the 12 data series). Inspection of the data showed that for many of these points, the y-value was the same value as the previous point (in other words, there were many segments of each series where the line was flat).

              So I removed these redundant points and added the series style attributes {connectDiscontinuo usPoints: true, discontinuousDashLe ngth: 1}, so that the chart would fill in the removed points instead of the points being supplied by the data series.

              Now, my chart had only 219 points instead of the original 905. But the drawing time was almost exactly the same. I would have expect it to take about 1/4 of the time

              I should add that I am using a JavaScript array as my data source

              Any guidance or information is much appreciated.



              [The entire original message is not included]
            Your message has been successfully submitted and would be delivered to recipients shortly.