elsholz / metroplanner

Tool to create maps of metro lines
GNU General Public License v3.0
1 stars 1 forks source link

Optimizations #2

Open elsholz opened 1 year ago

elsholz commented 1 year ago

For optimization of load and render times here are a few ideas:

  1. Merge inline line segments. Easily lessens the amount of line segments to render by 80-90%.
  2. Return this list of line segments directly to the client, instead of a list of connections per line.
  3. Generate CSS in the backend and supply it with the planState API calls.
  4. Cache planState API call results in the backend, as planStates don't change in the database.
elsholz commented 1 year ago

Instead of keeping markers and their labels in separate objects, merge the labels into the markers. Standalone labels remain in the labels object and are rendered separately.

elsholz commented 6 months ago

For plan & planstate caching: Store a hashsum of the values. Clients can then use the hashsums of the plans & planstates they have already cached to receive a 304 Not Modified when requesting the identical data.