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

Reactive web #84

Merged
merged 3 commits into from Jul 18, 2015
Merged

Reactive web #84

merged 3 commits into from Jul 18, 2015

Conversation

commial
Copy link
Member

@commial commial commented Jul 12, 2015

This PR aims to speed up the web rendering.

According to Speeding up AngularJS apps with simple optimizations:

It’s known that Angular becomes slower with around 2,000 bindings due to the process behind dirty-checking. The less we can add to this limit the better, as bindings can add up without us really noticing it!

Using a $$watchers counter, on a slow render query (#1 range:64.170.144.217-69.39.229.61 on ModBus scan):

  • Without the PR: 250 359 watchers (!)
  • By rendering full view only if host.fulldisplay: 25494. On my computer, this is the difference between a "Slow script" box on Firefox and no box.
  • By using the AngularJS one-time-binding syntax on summary {{::: 8866. Expanding the first result (67.47.105.226) go to 29698.
  • By using this same syntax on full mode: 18975 with the first result opened.

More optimization could be done. This PR aims to be a first step in order to allow a better render time on big hosts.

@p-l-
Copy link
Member

p-l- commented Jul 13, 2015

Really nice catch! There are still a lot bindings that should be switched to one-time bindings in templates/. Do you want to fix them in the same PR or do you prefer that I merge this one and do the remainder in another one?

p-l- added a commit that referenced this pull request Jul 18, 2015
@p-l- p-l- merged commit ffc75b1 into ivre:master Jul 18, 2015
@commial commial deleted the reactive-web branch July 20, 2015 15:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants