Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Optimisations

#188

Optimise Events Between Modules

Currently SceneJS is designed a bit defensively in terms of extensibility. When a geometry node is rendered, it

  1. fires an event to export itself,
  2. the renderer module collects that, then fires an event to announce geometry is rendering
  3. various modules (like modules for material, texture, model transform) respond by firing export events (unless they have already exported up to date state for the last geometry)
  4. rendering module collects those, then builds a hashcode, finds the right shader from that hash
  5. adds geometry to display list, linked to currently exported nodes

Then when traversal done, SceneJS sorts and renders the display list.

There's a lot of event creation going on in there for rendering a geometry, which involves looking up listeners, creating param objects etc. That should be replaced by callbacks, where each (texture, material etc) module should register a callback directly on the renderer module through which the latter can just directly pull state.

Reduce Getters and Setters on Node Classes

Since the JavaScript API is deprecated, the way is clear to make that inner JS workings more functionally-oriented. Since we now have them encapsulated behind JSON we can relax the design of the node classes and do things like expose a lot of their state as property members instead of through getter and setter methods.

Memoize Scene State Hashes

Compute the hashcodes for nodes like material, geometry etc. within their modules. Retain those hash codes and only re-compute them when attributes change.

Reported by lindsay.kay (at xeolabs) · October 30th, 2010 @ 12:53 AM

State: new
Milestone: none

Activity

No comments yet.

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.