In this specific instance, not a lot: a single line. (Unless I’m inadvertently doing more than I intend.)
In the game overall, a fair bit–I don’t have a full count, but I have a number of “toml” files, many of which contain a number of entries.
I… Honestly wasn’t aware that we had markup functionality. ^^;
More to the point, the one feature that I am using is an outline. I’m also setting the point-size, line-height, space-advance, and background-colour.
Based on some testing, it looks like it’s a combination of the point-size and outline:
In today’s testing:
- With all of the above settings, I get a spike of ~23ms
- With none of the above settings, I get a “spike” of ~1.4ms
- With no outline, I get a spike of ~4.3ms
- With no point-size, I get a spike of ~3.7ms
- With neither outline nor point-size, I get a “spike” of ~2ms
- With point-size and outline, but none of the other settings, I get a spike of ~23ms
Which would seem to be a trouble, as I’m using the outline feature to create nicely-outlined text that (A) looks good and (B) is visible on a variety of backgrounds.
That said, it is possible that I could reduce the point-size: I imagine that I applied that setting in order to get nice crisp text–but as I’m using the same value for much larger text elsewhere, I may well be overdoing it for this text.
Thank you for that!
Hmm… Setting the “text-page-size 512 512
” option does bring the spike down to ~12ms, so that’s tempting.
(I’m not sure that the removal of text-flattening is likely to be helpful in my case, and I’m hesitant to try it.)
A good thought!
(For any reading this in the future, let me clarify that the config variable is the other way around: “pstats-python-profiler 1”.)
But oof, the performance impact of the Python profiler! o_o What do you have against my poor computer, rdb?! XD;
As to the results, it indicated… just AudioSound->play. A massive spike in that one place.
As to checking how many events are being generated, how might I do that? I don’t see a likely config-variable or PStats collector, offhand.
I tried “notify-level-event spam
”, which, well, spams events–it’s hard to be sure of what’s happening quite when. I also tried “notify-level-EventManager spam
”–but it seemed to produce no output.
I did try “pstats-eventmanager 1
”, and it seems to be indicating a lot of time in an event called “player”.
Now, my player-character’s collider is named “player”, and the issue comes up on collecting an item–something that is done via collision. (Using Panda’s built-in collision system.)
So I’m wondering whether perhaps I’m getting lots of collisions for some reason–the object with which the player collides in this matter should be being removed as a result, but perhaps it’s happening too late?
Perhaps, then, that’s causing the associated sound to likewise be played many times over–thus resulting in a spike in both events and audio-playing…
It’s something to investigate, at least!
[edit]
Update: I don’t seem to be finding multiple player-involved collision-events as I’d speculated.
I did find a recurring redundant collision–and object that was essentially colliding with itself, due to having two colliders that shared a bit–which I’ve rectified. However, it seems to have been pretty much harmless, and the fix doesn’t seem to have changed the “player” section of the event-manager reporting.
(Which makes sense, as it didn’t involve the player.)