Skip to content
This repository has been archived by the owner on Jun 27, 2023. It is now read-only.

Re-render everything on each IO result #4

Open
slorber opened this issue Jan 24, 2014 · 1 comment
Open

Re-render everything on each IO result #4

slorber opened this issue Jan 24, 2014 · 1 comment

Comments

@slorber
Copy link
Contributor

slorber commented Jan 24, 2014

This can help to have a consistant view according to the data we have.
This means we inject a global state to the application from the top level component everytime an ajax request comes back/the store is updated.

But this also means that we need to find a way to optimize the shouldComponentUpdate of React, or it would recompute a lot of full virtual DOMS (on every response), which can be expensive

@bblfish
Copy link
Member

bblfish commented Jan 24, 2014

The Fetcher from @timbl 's rdflib stores all the metadata about the graphs it fetches in a particular graph in the store. You should be able to get all the information from that graph, and create some hash to distinguish it from any changed version. ( That would deal with information about when a graph was last fetched at least, though not if someone wrote directly into the graph. ) What is missing is a function to find that graph easily.... Otherwise one would need to see if there is a way to check the $rdf.IndexedStore directly for changes. ( I could not find anything as it is )

Most Top Level Components should start with a PointInNamedGraph ( PiNG in rww_play, and currently PointedGraph in foaf-react libs).

A react component that displays a PointedGraph and only display information in the graph in which the pointer is, need not of course be changed if the graph of the pointed graph did not change.

But a component that has jumped to other graphs will need to watch out that the jumped graphs have not also changed. So it seems that one optimisation is for each top level component to be made aware of the graphs it has jumped to in order to display its sub components.

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