Skip to content

Implement autoreload for route viewer.#1256

Draft
adfriz wants to merge 4 commits into
leezer3:masterfrom
adfriz:route-viewer-auto-reload
Draft

Implement autoreload for route viewer.#1256
adfriz wants to merge 4 commits into
leezer3:masterfrom
adfriz:route-viewer-auto-reload

Conversation

@adfriz

@adfriz adfriz commented Apr 7, 2026

Copy link
Copy Markdown
Contributor
  • most of it almost the same like object viewer one
  • add a freeze frame for transition if manually reloaded to make it not flicker when autoreload turn on.

- most of it almost the same like object viewer one
- add a freeze frame for transition if manually reloaded when autoreload turn on.
@adfriz

adfriz commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

@leezer3 ready to check.

@leezer3

leezer3 commented Apr 8, 2026

Copy link
Copy Markdown
Owner

If I'm honest, this is one I'm a lot more cautious of.

Reloading a route takes 20+ seconds for anything of size (and that's with a top end PC + SSD) etc, as opposed to under a second for most objects.

@adfriz

adfriz commented Apr 8, 2026

Copy link
Copy Markdown
Contributor Author

Actually i feel the same, i dont know how i should to do this better, the first think came up on my mind is some sort of selective reload but i dont know how we can detect which line of the route file the user edited, and most of it use external text editor like notepad.

Testing this PR on other routes took it more than 15s for the first load and around the same for reload.

i test with this route:
https://routefikrirf06.blogspot.com/2019/08/rute-openbve-rangkasbitung-merak.html

click "download disini"

btw i noticed a lot of GC calls when loading that route, this feels abnormal...

image

leezer3 added a commit that referenced this pull request Apr 8, 2026
leezer3 added a commit that referenced this pull request Apr 8, 2026
Now handled via the spinning thread, so this is pointless churn
#1256
@leezer3

leezer3 commented Apr 8, 2026

Copy link
Copy Markdown
Owner

Not sure why the garbage collection is kicking in, but I wouldn't worry about that specifically too much when running in the debugger.
Quite often, things get optimized out when not in the debugger.

I've found a couple of marginal improvements based on that route, but nothing spectacular.

@ginga81

ginga81 commented Apr 10, 2026

Copy link
Copy Markdown
Contributor

I'm sorry for talking about this when I can't program.

How about to get diff check nuget?

DiffPlex (nuget) Apache 2.0 license

The fact that someone as skilled as you is struggling with this means that, we can't simply put, when reading the file, it stores the entire string of text as is, and when it detects a change, is it?
difficult...

adfriz added 2 commits April 10, 2026 17:51
- Compare route file lines to detect first changed track position.
- Skip objects before change point in CSV/RW parser.
- Refine object disposal to prevent 'ghost objects' during partial reloads.
- Update renderer and object manager to support selective resets.
@adfriz adfriz marked this pull request as draft May 8, 2026 15:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants