Skip to content

Avoid rebuild old FindTrackedObjectsInJson into json CalculateDiff - #11631

Open
PolEpie wants to merge 1 commit into
Facepunch:masterfrom
PolEpie:opti-json-calcdiff
Open

Avoid rebuild old FindTrackedObjectsInJson into json CalculateDiff#11631
PolEpie wants to merge 1 commit into
Facepunch:masterfrom
PolEpie:opti-json-calcdiff

Conversation

@PolEpie

@PolEpie PolEpie commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Pull Request

Thanks for contributing to s&box ❤️
Please fill out the sections below to help us review your change efficiently.


Summary / Motivation & Context

This is part of a big finding on my #11630 issue
So i saw that FindTrackedObjectsInJson was called twice and did it with old / new, and i was like hmm, couldnt that being cached ?
image

Implementation Details

So my pr is simple, into PrefabCacheScene.Load, we calculate the Json.BuildTrackedObjects directly, and use it on FindTrackedObjectsInJson instead of recalculate it.
Anyway once a prefab is saved it's gonna recall load and update it

Checklist

  • Code follows existing style and conventions
  • No unnecessary formatting or unrelated changes
  • Public APIs are documented (if applicable)
  • Unit tests added where applicable and all passing
  • I’m okay with this PR being rejected or requested to change 🙂

@lolleko

lolleko commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Good idea, but i don't like the fact though that we are making diffing internals public/internal.
Will think about it.

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.

2 participants