Slow TChart with several lines...
Posted: Tue Apr 01, 2014 5:50 pm
I have enclosed a demo project (using XE5 and latest release but checked with older (2013) versions of TChart too) which adds a punch of lines and then gives feedback by moving over an image. The problem is, that the response of that feedback gets slow with additional lines added.
Instructions:
1. Please compile and run the appliction (maximize it!!! -> the bigger the screen the greater the effect is)
2. Move over the image in the bottom/left corner. A "cursor"-series will appear, which moves pretty fast (as expected). Trying to move in horizontal lines will give the impression of a moving sinus to some extent. Please use only the upper half of the image and try to move quickly ...
3. Press "Add Dataset.." button (top/left) and try to move around over the image (see pt. 2)
4. Repeat pt 3 until the "Add DataSet.." button gets grayed out. This adds 10 sets of lines but TChart shows only the average value of the sets and for the current set an aura is shown with all the minima and maximas of that set.
At this stage the "cursor"-series has a little bit of a lag already - but that would be acceptable.
5. Try to use the "Select set" dropdown box and select set #1 to see the aura is very small with this set. Try all the other sets to get an impression and then return to set #1.
6. Press the "Edit" button beside the "Select set" box and all the lines the current set consists off, will be displayed. In addition the "Select line" dropdown box is filled with numbers corresponding to those lines and the first one is selected (and high-lightened in the chart). Selecting other lines (drop down the list and select line number 5 for example, will change the line in the chart too).
7. Moving over the image (like in pt. 2) will show the "cursor"-series again and gives you an impression of responseness of that series.
8. Select the next set (eg. "Set #2") and press the "Edit"-button again and repeat pt. 7
At "set #5" things start to get really slower and at set #8 (240 lines) movement of the cursor-series and the mouse on the image have great lag. At set #9 it gets unbearable and at set #10 its so slow that the "curser"-series just jumps to a few lines when moving over the image.
That behavior might come from inefficient usage of the component and so I'm asking,
if you can help me to have better response (preferable speeds like with set #3) for sets with up to 500 lines?
Please note, that there are some parts left out in the demo. In the real application moving over the TChart series in "edit"-mode a cursor is shown on the image whenever a line of data is found beneath the mouse (as data isnt random then and each line in the chart corresponds to a destinct location in the image)...
TIA
Whookie
Instructions:
1. Please compile and run the appliction (maximize it!!! -> the bigger the screen the greater the effect is)
2. Move over the image in the bottom/left corner. A "cursor"-series will appear, which moves pretty fast (as expected). Trying to move in horizontal lines will give the impression of a moving sinus to some extent. Please use only the upper half of the image and try to move quickly ...
3. Press "Add Dataset.." button (top/left) and try to move around over the image (see pt. 2)
4. Repeat pt 3 until the "Add DataSet.." button gets grayed out. This adds 10 sets of lines but TChart shows only the average value of the sets and for the current set an aura is shown with all the minima and maximas of that set.
At this stage the "cursor"-series has a little bit of a lag already - but that would be acceptable.
5. Try to use the "Select set" dropdown box and select set #1 to see the aura is very small with this set. Try all the other sets to get an impression and then return to set #1.
6. Press the "Edit" button beside the "Select set" box and all the lines the current set consists off, will be displayed. In addition the "Select line" dropdown box is filled with numbers corresponding to those lines and the first one is selected (and high-lightened in the chart). Selecting other lines (drop down the list and select line number 5 for example, will change the line in the chart too).
7. Moving over the image (like in pt. 2) will show the "cursor"-series again and gives you an impression of responseness of that series.
8. Select the next set (eg. "Set #2") and press the "Edit"-button again and repeat pt. 7
At "set #5" things start to get really slower and at set #8 (240 lines) movement of the cursor-series and the mouse on the image have great lag. At set #9 it gets unbearable and at set #10 its so slow that the "curser"-series just jumps to a few lines when moving over the image.
That behavior might come from inefficient usage of the component and so I'm asking,
if you can help me to have better response (preferable speeds like with set #3) for sets with up to 500 lines?
Please note, that there are some parts left out in the demo. In the real application moving over the TChart series in "edit"-mode a cursor is shown on the image whenever a line of data is found beneath the mouse (as data isnt random then and each line in the chart corresponds to a destinct location in the image)...
TIA
Whookie