From: SourceForge.net <no...@so...> - 2009-01-31 22:56:01
|
Bugs item #2553682, was opened at 2009-01-31 21:42 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 1.0.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: Daniel Dyer (dandyer) Assigned to: Nobody/Anonymous (nobody) Summary: Auto-range performance is poor for large data sets Initial Comment: Auto-range performs poorly with large data sets. If I have thousands of items in my dataset and I'm adding more every second, JFreeChart consumes more and more of my application's CPU time. I had a brief look at the code and it's the iterateRangeBounds method that is causing the problem. Every time a new item is added to the dataset, it iterates over the whole data set to find the maximum and minimum values. The more items in the dataset, the longer this takes. It's O(n) when it could be O(1) if the code kept track of the minimum and maximum so that it didn't have to search each time. When a new value is added, it is either between the current minimum and maximum (in which case the range does not change), or it is a new minimum or maximum. Would it be possible to change the code to work like this? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 |
From: SourceForge.net <no...@so...> - 2009-01-31 23:01:19
|
Bugs item #2553682, was opened at 2009-01-31 21:42 Message generated for change (Comment added) made by dandyer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 1.0.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: Daniel Dyer (dandyer) Assigned to: Nobody/Anonymous (nobody) Summary: Auto-range performance is poor for large data sets Initial Comment: Auto-range performs poorly with large data sets. If I have thousands of items in my dataset and I'm adding more every second, JFreeChart consumes more and more of my application's CPU time. I had a brief look at the code and it's the iterateRangeBounds method that is causing the problem. Every time a new item is added to the dataset, it iterates over the whole data set to find the maximum and minimum values. The more items in the dataset, the longer this takes. It's O(n) when it could be O(1) if the code kept track of the minimum and maximum so that it didn't have to search each time. When a new value is added, it is either between the current minimum and maximum (in which case the range does not change), or it is a new minimum or maximum. Would it be possible to change the code to work like this? ---------------------------------------------------------------------- >Comment By: Daniel Dyer (dandyer) Date: 2009-01-31 21:46 Message: The workaround that I have used to avoid this is to turn off auto-range and to keep track of the minimum and maximum and manually adjust the range every time I add a value. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 |
From: SourceForge.net <no...@so...> - 2009-02-01 07:55:58
|
Bugs item #2553682, was opened at 2009-01-31 21:42 Message generated for change (Comment added) made by mungady You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 1.0.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: Daniel Dyer (dandyer) >Assigned to: David Gilbert (mungady) Summary: Auto-range performance is poor for large data sets Initial Comment: Auto-range performs poorly with large data sets. If I have thousands of items in my dataset and I'm adding more every second, JFreeChart consumes more and more of my application's CPU time. I had a brief look at the code and it's the iterateRangeBounds method that is causing the problem. Every time a new item is added to the dataset, it iterates over the whole data set to find the maximum and minimum values. The more items in the dataset, the longer this takes. It's O(n) when it could be O(1) if the code kept track of the minimum and maximum so that it didn't have to search each time. When a new value is added, it is either between the current minimum and maximum (in which case the range does not change), or it is a new minimum or maximum. Would it be possible to change the code to work like this? ---------------------------------------------------------------------- >Comment By: David Gilbert (mungady) Date: 2009-02-01 07:55 Message: Yes, it can be changed (in fact the DomainInfo and RangeInfo interfaces are provided just for that type of implementation...it's just that I never got around to providing the caching of min and max values). Which dataset class are you using? (So I can look at that one first). ---------------------------------------------------------------------- Comment By: Daniel Dyer (dandyer) Date: 2009-01-31 21:46 Message: The workaround that I have used to avoid this is to turn off auto-range and to keep track of the minimum and maximum and manually adjust the range every time I add a value. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 |
From: SourceForge.net <no...@so...> - 2009-02-01 12:20:30
|
Bugs item #2553682, was opened at 2009-01-31 21:42 Message generated for change (Comment added) made by dandyer You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: General Group: 1.0.x Status: Open Resolution: None Priority: 5 Private: No Submitted By: Daniel Dyer (dandyer) Assigned to: David Gilbert (mungady) Summary: Auto-range performance is poor for large data sets Initial Comment: Auto-range performs poorly with large data sets. If I have thousands of items in my dataset and I'm adding more every second, JFreeChart consumes more and more of my application's CPU time. I had a brief look at the code and it's the iterateRangeBounds method that is causing the problem. Every time a new item is added to the dataset, it iterates over the whole data set to find the maximum and minimum values. The more items in the dataset, the longer this takes. It's O(n) when it could be O(1) if the code kept track of the minimum and maximum so that it didn't have to search each time. When a new value is added, it is either between the current minimum and maximum (in which case the range does not change), or it is a new minimum or maximum. Would it be possible to change the code to work like this? ---------------------------------------------------------------------- >Comment By: Daniel Dyer (dandyer) Date: 2009-02-01 12:20 Message: I am using XYSeriesCollection. ---------------------------------------------------------------------- Comment By: David Gilbert (mungady) Date: 2009-02-01 07:55 Message: Yes, it can be changed (in fact the DomainInfo and RangeInfo interfaces are provided just for that type of implementation...it's just that I never got around to providing the caching of min and max values). Which dataset class are you using? (So I can look at that one first). ---------------------------------------------------------------------- Comment By: Daniel Dyer (dandyer) Date: 2009-01-31 21:46 Message: The workaround that I have used to avoid this is to turn off auto-range and to keep track of the minimum and maximum and manually adjust the range every time I add a value. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=115494&aid=2553682&group_id=15494 |