-
-
Notifications
You must be signed in to change notification settings - Fork 293
Fix: refactor profiling IDs from statics to state members #661
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
Conversation
…nd buffer and assignment logic Next up, prepare details from graphics.defineEffect()
…from Program Slight redesign of TimeTransform with caching (to synchronize multiple invocations with a frame) and slightly less heavyweight call site
Err, was calling Modulo for sine method, heh That said, time transform seems to work in basic test
Fixed error detection for positive number time transform inputs Relaxed amplitude positivity requirement
Maintenance Revert Test
My mistake adding back changes made
This reverts commit 0b5e1e9.
…, but aren't used in production) GetOrCreate() removed; the ones not used by event listeners are Create()'d up front Slight change of PROFILING_BEGIN() macro for new usage Simulator run variable is gone now
…listener, rather than when event name first appeared globally Removed ShortName (since it also blew up the size of some structures) and enforcing that profiling-related string lifetimes are static or held in Lua Replaced with Payload that can take a string or a pointer (table or function) Also has an option for owned strings, but probably iffy (or could be something else instead) Due to that, able to avoid some allocations in getTimings() Also added other possiblities there when time is false (as with sublists), using a @ at start to indicate keyword
I let leak slip into the PR commit (details in 894b3ad's comments). That should be fixed now; I let this test churn through a few million objects and memory leveled off early and held steady:
I did a bit of reorganization while I was at it. I'm double-checking with those folks that I know did anything with the results so far, but made a very slight change to the output of
|
…nes like update and render, by the looks of it); just using raw ones and a Type member now in payloads
849f318's comment should read "assumption of aligned strings". Anyhow, with that revision it seems okay on Mac, and I'll put it through its Android paces shortly. |
As mentioned in the closing comment of #660, I realized the case with
static
IDs was pretty hopeless. Thankfully, it was actually rather easy at this point to move them into theProfilingState
, which was on hand when they were needed. Previous design was a bit of inertia from the former stack trace-stifling version. 😄I reproduced the issue on Mac, mentioned in #help-and-support on Discord, where launching from, say, the file dialog, would lead to a crash. With this it goes away.