Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2405

Summary: FastLine performance degradation since TeeChart 2017
Product: .NET TeeChart Reporter: Armin Walter <walter>
Component: SeriesAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: regression CC: chris
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
Chart Series: --- Delphi / C++ Builder RAD IDE Version:
Attachments: Example Projects for performance comparison between V 4.1.2017.10196 and V 4.2021.2.2

Description Armin Walter 2021-03-01 07:58:03 EST
Hi, we've used the TeeChart FastLine series for several years now for plotting streams of time series data. A typical use case is that every 100 ms, 5000 new data points come in and need to be drawn, with about 250000 data points (i.e. 5 seconds of data) visible at every moment.

Our application used TeeChart for .NET V 4.1.2017.10196 64-Bit so far and we've been quite happy with its performance on this task. Now we've updated to the newest TeeChart version (V 4.2021.2.2) and the performance has definitely degraded. The display is jerky and delayed and the UI thread seems to be fully occupied with drawing the data, so other UI controls aren't redrawn anymore, for example. In the 2017 version this was not an issue, but I tested a few more versions available via NuGet, down to V 4.2018.9.28, and they all seem to have worse performance than the 2017 version.

I've attached an example solution, with 2 projects with identical code: One references the 2017 TeeChart, the other the most recent one. There is a clear performance difference between the two, I think.

Is this a general problem with the newer TeeChart versions? Are there any settings we_ve missed that could improve the performance of the newer TeeChart versions? Any help would be appreciated!

Thanks!
Armin
Comment 1 Armin Walter 2021-03-01 08:00:43 EST
Created attachment 958 [details]
Example Projects for performance comparison between V 4.1.2017.10196 and V 4.2021.2.2

The FastLine_Performance_2017 project expects a reference to the V 4.1.2017.10196 TeeChart.dll as x64 in its root folder. Couldn't upload it with the dll due to file size limit, sorry!
Comment 2 christopher ireland 2021-03-01 08:04:35 EST
Hello Armin,

just to double-check - are we talking about assemblies built against the same platform? If I understand you correctly, the 2017 version you use is built against x64, whereas the 2021 one is built against x86 - is this correct?
Comment 3 Armin Walter 2021-03-02 03:41:07 EST
Hi Christopher,

thanks for getting back to me! I had a closer look at the platforms for the TeeChart.dll's, and the 2017 version is indeed built against x64, the 2021 version (imported via NuGet) is built against x86.

Sorry for not checking this sooner, this might explain the performance difference we are seeing... I'd like to do the same comparison with assemblies built agains x64 only, of course, but: Is there a way to get x64 TeeChart versions via NuGet? The Steema.TeeChart.NET package only seems to install x86 versions, as far as I can tell. 

Thanks!
Armin
Comment 4 christopher ireland 2021-03-02 11:35:29 EST
Hello Armin,

Okay, no problem, I was just checking. The first thing we can try is to offer you an x64 build of the head revision of the source code, which you can download from here:

http://steema.com/files/public/support/TeeChartPro_4.2021.3.2.zip

If you continue to experience problems with the FastLine series using this assembly, do please let us know and we'll take a closer look!
Comment 5 Armin Walter 2021-03-03 04:17:46 EST
Hi Christopher,

great, thanks for providing the x64 build! Unfortunately, using the x64 2021 version doesn't seem to change the issues we're having with the post-2017 versions. I've created some videos as comparison (identical code, except the TeeChart reference and the title, of course):

http://download.multichannelsystems.com/tmp/aw/TeeChart_2017_x64.mp4
http://download.multichannelsystems.com/tmp/aw/TeeChart_2021_x86.mp4
http://download.multichannelsystems.com/tmp/aw/TeeChart_2021_x64.mp4

It's basically the same code as the one in the solution I had attached before, with two minor changes: I added a Start button (for easier video-making ;-)) and I'm adding a random value to each data point so it's easier to see if the display is moving:

line.Add(count * 5000 + i, data[i] + random.Next(-3000, 3000));

Apart from that: All are Release builds, built against x64. The 2017 version displays everything smoothly, whereas the 2021 version display the data very jerky. Starting from data point 500.000, I'm deleting points in the series which the 2017 build handles perfectly fine, but the 2021 versions aren't able to display all data anymore.

It would be great if you could look into this!
Comment 6 christopher ireland 2021-03-03 04:50:47 EST
Hello Armin,

I've had a quick look to see if I could reproduce the issue, and yes, I can confirm that there is what seems to be a performance hit between the two versions. We will look into the issue more carefully and get back to you. Thank you for bringing our attention to it.
Comment 7 Armin Walter 2021-03-03 05:00:05 EST
Hi Christopher,

thanks for the fast response and for looking into this! We've been very happy with TeeChart so far and we're looking forward to the fix, so we can update to the newest versions.

Best,
Armin
Comment 8 christopher ireland 2021-03-03 06:48:33 EST
Hello Armin,

thank you for your confidence in TeeChart!

Just to let you know that we've found where the problematic code was introduced; it was done so in the fix to this issue:
http://bugs.teechart.net/show_bug.cgi?id=2008

We will revise the code in the attempt to maintain performance while fixing that defect and will build and release a new NuGet file - this shouldn't take us more than a couple of days.
Comment 9 christopher ireland 2021-03-08 10:23:30 EST
Hello Armin,

We've just published a new NuGet package here:
https://www.nuget.org/packages/Steema.TeeChart.NET/4.2021.3.5

In our tests here, this seems to have resolved the issue.
Comment 10 Armin Walter 2021-03-08 10:35:30 EST
Hi Christopher,

awesome, thanks for fixing this so quickly! In the example project, the performance has definitely improved massively with the new version. I'll test it in the "real" project in the next days...

Thanks again!
Armin