-
Notifications
You must be signed in to change notification settings - Fork 172
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
Rendering Performance #45
Comments
The problem in this case is that initial render of the slider is always going to be slow, as a result of the design. The slider can't set the positions and styles of its sub-elements until it knows the dimensions of its container in the DOM. So the slider waits until it is rendered for the first time, and then initialises itself, adjusting the styles of its sub-elements as necessary. This is also complicated somewhat by Angular, because once the view has changed (again), Angular change detection kicks in, re-checking all the bindings. I would also say that 480 dynamic elements on a page, be it sliders or something else, is already quite a lot to handle for the browser. I think you are going to see performance issues no matter what component you use. |
No, I'm afraid it's all or nothing at the moment. The time it takes for each slider to initialise itself and apply all the styles just adds up. Now, there might be a way to improve it, by cutting out some of Angular's overhead, and possibly skipping some initialisation steps when they are not needed. But to do that, I'll need to profile the code and I'll see what I can do. |
Don't worry and take your time. |
I've got a similar problem with the slider. @rs200x Could you describe your solution to this problem? |
@jhinzmann my solution is to use the stand input type=range and just to use the ng5 slider for the double range items. But there I also have some rendering problems: Once I click on one of them, the all markers get placed correctly. |
@rs200x the set of features that you use for the slider (no labels, same width for a lot of sliders) actually are quite similar to the set I use in my setup. I opened a pull request (#59) that should improve the performance for this kind of setups. |
Changes from @jhinzmann's pull request is now available in v1.1.12. |
Hi,
I have a view where I have to display 480 sliders (120 rows with 4 sliders each).
Once the view is rendered it looks nice and every slider can be used without any delay.
But the rendering process takes als 5-7 seconds, which is not really acceptable.
In the console log I see again some violation issues:
As I need only a simple layout, I already tried to disable all possible options.
![2018-12-05 11_50_01-bidib-toolbox](https://user-images.githubusercontent.com/39993567/49508973-6e051b00-f884-11e8-91d3-6ea975e04c4a.png)
Is there more I can tweak?
The text was updated successfully, but these errors were encountered: