Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Harmonize layers data #694

Open
3 tasks
SharglutDev opened this issue Nov 5, 2024 · 1 comment
Open
3 tasks

Harmonize layers data #694

SharglutDev opened this issue Nov 5, 2024 · 1 comment

Comments

@SharglutDev
Copy link
Contributor

SharglutDev commented Nov 5, 2024

Description and goal

To facilitate the management of layers in osrd-ui, we should harmonize their data in this repo.

We should follow the model of conflicts type :

export type Conflict = {
    timeStart: number;
    timeEnd: number;
    spaceStart: number;
    spaceEnd: number;
};

Merging this issue will allow to remove some TODO in ManchetteWithSpaceTimeChart.tsx in osrd repo.

Acceptance criteria

All current layers follow this model :

  • Path
  • Occupancy block
  • Work schedules
@emersion
Copy link
Member

Note, it appears the PathLayer data has been formatted this way (in two separate arrays) to follow data-oriented design principles. In theory it should be easier on the memory allocator and CPU cache when handling lots of trains with many data points. I haven't verified that this is the case in practice (maybe not because of JavaScript's memory layout?), or if it really makes a substantial difference.

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

No branches or pull requests

2 participants