choko icon indicating copy to clipboard operation
choko copied to clipboard

Front-end performance improvements

Open recidive opened this issue 10 years ago • 8 comments

Right now our front-end rendering performance is far from ideal. Here are some simple things (some not so simple) we can do to improve it:

  1. Currently we render the layout everytime the context changes. We need to change it to only render the layout when there is an actual layout change.
  2. We need to figure out a way of rendering only the panels that are added to a region and remove the ones that are not in the current context.
  3. We could allow pages and panels (maybe through forms, buttons and actions) to invalidate the state of some panels.
  4. Add two-way binding so forms and lists are aware of each other on the page, and editing an item reflects changes automatically if the item is being shown elsewhere on the page.

recidive avatar Aug 26 '14 21:08 recidive

We can also consider using AngularUI Router for having states.

recidive avatar Aug 26 '14 23:08 recidive

:+1:

jardix22 avatar Aug 26 '14 23:08 jardix22

Yeah we definitively must give an attention to this issue. I agree that AngularUI can help for achieving the 4 goals for the 0.1 first version.

Either way, ReactJS with it's virtualdom and, the state oriented architecture seems the right way for the 0.2 version.

sebas5384 avatar Aug 27 '14 02:08 sebas5384

There's also this Angular Routing module that seems interesting:

http://dotjem.github.io/angular-routing/ https://github.com/dotJEM/angular-routing

recidive avatar Aug 30 '14 17:08 recidive

The problem with UI Router as in it current production release is that it doesn't support lazy loading of states. It's possible in 0.3.x through $stateNotFound event:

https://github.com/angular-ui/ui-router/wiki#state-change-events

I'll figure out if it's possible to depend on the 0.3 version. Will also test Angular Routing as an alternative.

recidive avatar Sep 04 '14 03:09 recidive

Bindonce also can help, since we may not need to keep watching everything.

recidive avatar Sep 06 '14 16:09 recidive

This library from Yahoo can help with sharing states between server and the browser and could be used to replace the current mechanism for serving page state:

https://github.com/yahoo/express-state

Yahoo folks are using it with Flux and React.

recidive avatar Sep 09 '14 19:09 recidive

Items 1 and 2 were already implemented.

recidive avatar Mar 10 '15 21:03 recidive