Skip to content
This repository has been archived by the owner on Apr 23, 2019. It is now read-only.

Limit component creations #13

Closed
PowerKiKi opened this issue Jun 29, 2018 · 3 comments
Closed

Limit component creations #13

PowerKiKi opened this issue Jun 29, 2018 · 3 comments
Assignees

Comments

@PowerKiKi
Copy link
Member

When a new search value is entered all previously existing search values are re-evaluated. That means a few components are created and destroyed only to get their rendered value.

This might be OK for local things, but it becomes problematic when custom component need to fetch things over the network to render the value. That means every single new addition to the search will potentially trigger a few network requests to re-render previously available rendered strings. This is clearly visible in the GUI with string disappearing for a short time and make the GUI "jumps".

We must find a way to not need to re-render previously available string. Maybe via a custom cache.

@sambaptista
Copy link
Member

This is required to allow this #10

I've this in mind for a while, will take the time to check it.

@PowerKiKi PowerKiKi assigned PowerKiKi and sambaptista and unassigned PowerKiKi Jun 29, 2018
@PowerKiKi
Copy link
Member Author

I had in mind a cache system to avoid creating component at all. But then I found out we must have a component to be able to validate its value (via isComponentValid()), so my idea is no longer valid.

I think your idea to handle groupSelections more carefully might be better after all. I'll let you do it, because it would probably be easier for you.

sambaptista added a commit that referenced this issue Jul 2, 2018
Input and Outputs are no more related, to prevent too much interactions and initializations.
@sambaptista
Copy link
Member

Done as explained before.

Selections attribute is now input only (no more two way binding). Two way binding cause ng-for to re-render the view, and reinitialized inputs causing what we want to avoid in this ticket.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants