errors and warnings / debugging / P7301
P7301 hint
A single call took longer than the frame budget; spread the work across frames with wowlua:jobs
- area
- debugging (x7xxx)
- fails the build
- no
A performance hint from the dev window, not the compiler. A single call took
longer than the frame budget (frame-budget, 1 ms by default), so that frame
was late because of one piece of work. The hint names the function and the
slowest call; the slow view of the dev window has its stack.
Spread the work across frames: run it as a job of wowlua:jobs and call
ctx:check() in its loop, which yields when the frame's share of time is
used up. Work that does not need to happen at once, such as rebuilding an
index, can also wait for the end of combat. If the budget is too strict for
the addon, raise frame-budget in the profile or in the window.
Related codes
| code | message |
|---|---|
| P7101 | A handler runs very often in a recording (bursts of the same event); collapse bursts with @throttle from wowlua:timer |
| P7201 | A function creates a large share of the addon's garbage; reuse tables or cache results |
Offline
$ wowlua explain P7301 P7301 (hint): A single call took longer than the frame budget; spread the work across frames with wowlua:jobs