Skip to content
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

PiGui profiling changes. #4549

Merged
merged 3 commits into from Mar 2, 2019

Conversation

Projects
None yet
2 participants
@fluffyfreak
Copy link
Contributor

fluffyfreak commented Mar 2, 2019

In testing using PIONEER_PROFILER defined and our intrusive profiler (V-sync off, multiple runs, ctrl+shift+p ingame once terrain generated) this reduces the load of l_pigui_get_projected_bodies from ~8% down to ~1% of CPU time.

@ecraven has suggested there are other ways of doing this so this PR might only be useful as reference.

@fluffyfreak fluffyfreak requested a review from ecraven Mar 2, 2019

@fluffyfreak fluffyfreak merged commit 29b2c50 into pioneerspacesim:master Mar 2, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@fluffyfreak fluffyfreak deleted the fluffyfreak:imgui-profiling branch Mar 2, 2019

@jaj22

This comment has been minimized.

Copy link
Contributor

jaj22 commented Mar 3, 2019

I have trouble believing that tuples are that slow. Are you sure this was a fair test, ie. same object count?

@fluffyfreak

This comment has been minimized.

Copy link
Contributor Author

fluffyfreak commented Mar 3, 2019

@jaj22 yup, same object count, 3 runs each. The difference was small enough that I wouldn't normally bother, but since I also like clearly named structs I made the change.

@jaj22

This comment has been minimized.

Copy link
Contributor

jaj22 commented Mar 3, 2019

Ah, I was looking at the wrong commit. Makes sense now. General rule would be that creating lua tables and adding keys to them is extremely expensive.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.