Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve FF performance by only having one place to set the y-axis width #6492

Closed
wants to merge 1 commit into from
Closed

Improve FF performance by only having one place to set the y-axis width #6492

wants to merge 1 commit into from

Conversation

trevan
Copy link
Contributor

@trevan trevan commented Mar 9, 2016

I have a dashboard that has 11 line graphs. In FF, the browser hangs during the graph rendering and would usually ask me if I want to kill the process. Running a performance report during the page load showed that a lot of the time was taken up doing width calculations (either setting or getting).

It led me to the setWidth function in vislib/lib/layout/splits/column_chart/y_axis_split.js and after removing it, performance increased quite a bit. After noticing that without that function, the width of the y-axis was still being set, I tracked down the code in vislib/lib/y_axis.js that appears to do the same work. The only difference is the padding. In the y_axis_split.js, it adds a padding of 5 twice so I added a padding of 10 to y_axis.js.

Here's the performance graph before the change. The period between 9600ms and 16000ms is the rendering of the graph. It shows an fps of roughly 0 during that time period.
screen shot 2016-03-09 at 2 25 40 pm

Here's the performance graph after the change. The period between 9600ms and 12000ms is the rendering of the graph. This change shaves off 4 seconds in rendering time.
screen shot 2016-03-09 at 2 24 58 pm

I don't think this change breaks anything but I've only looked at line charts and bar charts. I've also checked it in Chrome and it doesn't seem to affect it that much.

@elasticsearch-release
Copy link

Jenkins standing by to test this. If you aren't a maintainer, you can ignore this comment. Someone with commit access, please review this and clear it for Jenkins to run; then say 'jenkins, test it'.

@epixa
Copy link
Contributor

epixa commented Mar 9, 2016

jenkins, test it

@rashidkpc
Copy link
Contributor

@stormpython can you review this and make sure that the spacing of the y-axis remains correct

@stormpython
Copy link
Contributor

@rashidkpc ok.

@stormpython
Copy link
Contributor

@trevan in Chrome, I am seeing staggered y axes.

screen shot 2016-03-22 at 12 29 27 pm

@stormpython
Copy link
Contributor

Same thing occurs in Firefox when splitting charts.

screen shot 2016-03-22 at 12 32 36 pm

@trevan
Copy link
Contributor Author

trevan commented Mar 22, 2016

Yeah, I just noticed that yesterday. I'm looking into what is causing it.

@panda01
Copy link
Contributor

panda01 commented Apr 30, 2016

@trevan did you ever figure out what was going on with this?

@panda01
Copy link
Contributor

panda01 commented May 11, 2016

Doesn't look like there's any interest in this anymore.

@panda01 panda01 closed this May 11, 2016
@trevan trevan deleted the speed-up-ff-graphs branch November 17, 2016 16:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants