Jump to content


Photo

Chart is slow

Chart uniChart TuniChart TChart Slow Performance

  • Please log in to reply
25 replies to this topic

#1 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 13 September 2015 - 01:51 PM

Hey, I noticed that the charting seems SLOW. If I have less than 50 items or so, it seems "reasonable". Not fast, but acceptable.

 

But if I have 300 points, then WOW, it's slow. And if I add several series then it's a magnified slowness.

 

Basically, I have a stock chart with 5 series in it. The differeent series keep track of different kinds of data over the same date range. I keep track of ONE YEAR (365 days) of data. It takes about 6 seconds for the graph to build and unlock the web page. So, if I have built the chart it takes a while to show it completly. OR if the chart is in a TAB, and I switch tabs to a non chart tab, it is fast, THEN I switch BACK to the chart with many points, THEN i have to wait many seconds before I can click on other things.

 

Have you any experience in this?

 

I turned off animate and it didn't make "much" of a difference.

 

Seems like a lot of people would be complaining about this.

 

Davie

P.S. I edited out EXTREMELY and SUPER slow... to be more accurate.


  • 0

#2 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 703 posts
  • LocationKufur Kassem, Palestine

Posted 14 September 2015 - 08:32 PM

Hi,

 

I have used unichart and the speed was OK.

 

If you complain about speed please specify the point where it's slow, I mean the slow maybe come from server side because there is a lot of data manipulation to do, or the respond time is extremely slow, or the drawing of the series is slow (client side).

 

When you know problem exactly then you can deal with it, I guess that the problem is with the data manipulation I mean it's very important to build the database (tables and fields) in the correct way (primary key and indexes- this is very important).

 

Once we had a problem of executing a queries in MySQL the action took a long time (about 3 hours) - I talk here about 800,000 records per day, and after that we change the definition of the indexes in our tables and we managed to reduce the time to 27 minutes !!


  • 1

#3 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 16 September 2015 - 11:56 AM

The problem has NOTHING to do with data base access. My datapoints are in a memory array. I assign the data points into the chart which goes fairly fast.

 

It's only in the DISPLAY of the chart where it's slow. For example: You can do this yourself. Make a chart with 300 points and have 5 series. So, I guess that's a total of 1500 distinct data points. Anyway, set up the 5 lineSeries each with 300 points. Then when the page displays, you can CLICK on one of the LEGEND items, so that the selected<clicked> lineSeries will become hidden. WAIT a bunch of seconds. Then if you click the same legend item, you will WAIT a bunch more seconds before the hidden lineSeries becomes visible again. I don't believe there is any server-side action going on here.

 

On my particular system, it's about 7 seconds that I have to wait before the graph is rebuilt and responsive.

 

Try it, you will see.

 

Davie


  • -1

#4 ZigZig

ZigZig

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 340 posts

Posted 16 September 2015 - 01:17 PM

Could you please post a test case ?

I tried to create 5 series with 5 x 300 points.  Hiding or showing a serie takes less than 1 second on my computer... 


  • 0

#5 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 16 September 2015 - 05:19 PM

Huh, I will do right now.

Thanks for the test

Davie


  • 0

#6 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9937 posts

Posted 16 September 2015 - 06:06 PM

As a quick note, JS charts are not as fast as VCL charts. Yes, they are slow compared with desktop charts. For this you need to display only meaningful amount of data to user. For example showing a 1000 point series doesn't make sense, as user will not be able to see that much dots. If you see similar web apps such as Google or Yahoo Finance you'll that they re-sample data and only show a subset of full data when you try to display a big date interval.


  • 0

#7 mohammad

mohammad

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 703 posts
  • LocationKufur Kassem, Palestine

Posted 17 September 2015 - 12:34 PM

I agree with Farshad 100%


  • 0

#8 ZigZig

ZigZig

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 340 posts

Posted 17 September 2015 - 03:35 PM

+1


  • 0

#9 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9937 posts

Posted 17 September 2015 - 07:06 PM

I noticed that "Animate" is enabled by default in uniGUI Charts. Disabling it may improve draw speed. Also removing markers can help too.

 

Fortunately next build will allow to configure above options.


  • 0

#10 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 18 September 2015 - 12:08 AM

Okay, I have a TINY project that shows all the wierd stuff going on.

 

Plus the form contains a MEMO that shows how to re-create the issues/bugs. That way you don't have to keep refering to this forum. You can just run the program, load up your browser and use....

 

http://localhost:8077

 

as your URL and you are off and running. Just follow the instructions in the two memo fields.

 

In case you just want to run in, I have the EXE in there. It is compiled with XE3.

 

The browsers I tested with are Chrome(latest), FireFox(latest), IE version 9.

 

The issues are graphs not building, or line graphs showing odd legends and lines.

 

I attached a ZIP file that contains all the project files plus the pre-compiled EXE from my XE3 compiler.

 

Have a look and I'm sure you should get the same results that I mention in the two memo fields.

 

Thanks

Davie

Attached Files


  • -1

#11 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9937 posts

Posted 18 September 2015 - 08:44 AM

Okay, I have a TINY project that shows all the wierd stuff going on.

 

Some of the weird stuff are already resolved as a result of improved layout management in latest build.

 

For hidden frame:

 

Drawing on hidden controls may have unwanted effects. It can also be a browser related bug as it works on chrome but fails on FF.

Instead of hiding and showing you can try creating and inserting your frame on demand when needed


  • 0

#12 ZigZig

ZigZig

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 340 posts

Posted 18 September 2015 - 09:37 AM

Hi Davie,

 

I just loaded and tried you "tiny" project (which is NOT so tiny).  I DIDN'T NOT note any slowness, even when clicking on "load valuation with 300 points": when I hide or show a series, it responds in LESS THAN 0,5 SEC (tried on Chrome and IE11). 

IMHO, your test case doesn't show any problem of slowness.  On IE9, it is a little bit slower... but that's IE9 :)

What is your version of uniGUI ?

 

I didn't notice your newer issues (graph not building or not refreshing) on Chrome, Firefox or MS Edge.  IE11 has some issues with javascript, that's a known thing, but it is not related to uniGUI.  And as Farshad says, it is probably related to the way you try to hide and show ExtJS components (IE probably doesn't execute scripts on hidden objects).

 

So as far as I can see, there is no bug related to "Chart is slow" (which is the title of this topic), is there ?


  • 1

#13 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 18 September 2015 - 02:05 PM

Farshad, that build# do I need then?

 

ZIG, thanks for taking time to look at it.

 

1. Did you run MINE or did you RE-compile your own?

2. Did you follow the TWO TMemo instructions on the right side of the form?

 

If you ran MINE and tested with chrome and FF and followed my two tmemo instructions and had no odd effects, please give me your version numbers for those two browsers that you used to test.

 

 

As for the speed, mine is about 1 full second, not real bad I suppose. I can live with that. It's mostly now the odd chart behaviour.

 

ZIG, sorry about project size, I honestly thought it was small.

 

Thanks for looking into this chart issue.

 

Davie


  • 0

#14 ZigZig

ZigZig

    Advanced Member

  • uniGUI Subscriber
  • PipPipPipPip
  • 340 posts

Posted 18 September 2015 - 02:22 PM

Hi again Davie !

 

I didn't run YOUR executable because it is not compiled in same uniGUI version as mine (which is the last one), so my browser stops on "Loading" page.  That's why I asked you what is your uniGUI version, but you didn't answer.

As I wrote in my previous answer, I didn't notice odd effects on Chrome and FF.

 

If you consider that you can live with the current speed, I guess that this "Active bug" topic named "Chart is slow" can be close (especially when your first words are "EXTREMELY SLOW"). 


  • 0

#15 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 18 September 2015 - 02:48 PM

Farshad;

 

The hidden frame is not drawn onto in a programatic way.

 

I have a form on the screen and the lower part contains a "hidden" frame. My program logic does not draw anything inside of it. I then click a checkbox on the form to SHOW the frame and the frame shows up<good>. THEN after I load my data points, the frame that USED to be hidden now shows the graph in a wierd way.

 

Now, I suppose it's possible that when the whole form is being displayed that INTERNALLY there may be some drawing on the hidden frame<i have no idea>. But my personal logic does not do any drawing on the frame while it's hidden.

 

Davie


  • 0

#16 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 18 September 2015 - 03:02 PM

Zig;

 

You said " so my browser stops on "Loading" page.  That's why I asked you what is your uniGUI version, but you didn't answer".

 

I have version "Library Version: 0.99.50.1189".

 

When you say your browser STOPS, are you saying you never see my form? I'm confused because your earlier post suggested that you were able to test the web form.

 

I am curious if you followed the instructions on my Tmemo(s)

2. Did you follow the TWO TMemo instructions on the right side of the form?

 

Thanks

 

Davie

P.S. Can you give me YOUR EXE version of my test project?


  • 0

#17 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9937 posts

Posted 18 September 2015 - 04:11 PM

Farshad;

 

The hidden frame is not drawn onto in a programatic way.

 

I have a form on the screen and the lower part contains a "hidden" frame. My program logic does not draw anything inside of it. I then click a checkbox on the form to SHOW the frame and the frame shows up<good>. THEN after I load my data points, the frame that USED to be hidden now shows the graph in a wierd way.

 

Now, I suppose it's possible that when the whole form is being displayed that INTERNALLY there may be some drawing on the hidden frame<i have no idea>. But my personal logic does not do any drawing on the frame while it's hidden.

 

Davie

 

By saying drawing I mean Ext JS framework trying to draw a chart series on a hidden chart component.


  • 0

#18 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 18 September 2015 - 04:27 PM

Farshad;

Thanks

 

Now where can I get build 1200?

 

Davie


  • 0

#19 Farshad Mohajeri

Farshad Mohajeri

    Administrator

  • Administrators
  • 9937 posts

Posted 18 September 2015 - 04:34 PM

Farshad;
Thanks

Now where can I get build 1200?

Davie

Build 1200 is not available yet for trial edition.

Trial edition is not updated as frequent as regular edition.
  • 0

#20 vbdavie

vbdavie

    Advanced Member

  • Members
  • PipPipPipPip
  • 108 posts

Posted 18 September 2015 - 05:08 PM

So, what should I be using in order to "possibly" correct the chart drawing wierdness?

Davie


  • 0





Also tagged with one or more of these keywords: Chart, uniChart, TuniChart, TChart, Slow, Performance

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users