ui: real startup profiling#37956
Open
adeebshihadeh wants to merge 2 commits intomasterfrom
Open
Conversation
Contributor
Process replay diff reportReplays driving segments through this PR and compares the behavior to master. ✅ 0 changed, 66 passed, 0 errors |
Contributor
UI Previewmici: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
comma@comma-13322bf1:/data/openpilot/system/ui$ PROFILE_STARTUP=1 ./setup.py gbm_create_device(156): Info: backend name is: msm_drm No WiFi device found No WiFi device found === Startup profile === 56592 function calls (55294 primitive calls) in 1.853 seconds Ordered by: cumulative time List reduced from 942 to 25 due to restriction <25> ncalls tottime percall cumtime percall filename:lineno(function) 5 0.000 0.000 2.956 0.591 /usr/lib/python3.12/threading.py:1115(join) 32/26 0.000 0.000 2.952 0.114 /usr/lib/python3.12/threading.py:1153(_wait_for_tstate_lock) 27 0.002 0.000 1.489 0.055 /usr/local/venv/lib/python3.12/site-packages/jeepney/io/threading.py:55(receive) 2 0.001 0.001 1.281 0.640 /usr/local/venv/lib/python3.12/site-packages/jeepney/io/threading.py:165(close) 10 0.000 0.000 1.280 0.128 /usr/lib/python3.12/threading.py:637(wait) 2 0.000 0.000 1.278 0.639 /usr/local/venv/lib/python3.12/site-packages/jeepney/io/threading.py:207(_receiver) 1 0.000 0.000 1.276 1.276 /data/pythonpath/openpilot/system/ui/lib/wifi_manager.py:934(stop) 7 0.000 0.000 1.193 0.170 /usr/local/venv/lib/python3.12/site-packages/jeepney/io/blocking.py:149(receive) 1 0.000 0.000 1.188 1.188 /data/pythonpath/openpilot/system/ui/lib/wifi_manager.py:328(_monitor_state) 1 0.000 0.000 1.188 1.188 /usr/local/venv/lib/python3.12/site-packages/jeepney/io/blocking.py:158(recv_messages) 1 0.000 0.000 0.906 0.906 /usr/lib/python3.12/urllib/request.py:138(urlopen) 2/1 0.000 0.000 0.906 0.906 /usr/lib/python3.12/urllib/request.py:496(open) 2/1 0.000 0.000 0.906 0.906 /usr/lib/python3.12/urllib/request.py:624(http_response) 5/3 0.000 0.000 0.892 0.297 /usr/lib/python3.12/urllib/request.py:485(_call_chain) 2 0.000 0.000 0.883 0.442 /usr/lib/python3.12/urllib/request.py:525(_open) 2 0.000 0.000 0.883 0.441 /usr/lib/python3.12/urllib/request.py:1391(https_open) 2 0.000 0.000 0.881 0.441 /usr/lib/python3.12/urllib/request.py:1303(do_open) 2 0.000 0.000 0.881 0.440 /usr/lib/python3.12/http/client.py:1404(getresponse) 1 0.000 0.000 0.879 0.879 /usr/lib/python3.12/urllib/request.py:540(error) 2 0.000 0.000 0.876 0.438 /usr/lib/python3.12/http/client.py:329(begin) 1 0.000 0.000 0.870 0.870 /usr/lib/python3.12/urllib/request.py:687(http_error_302) 2 0.000 0.000 0.869 0.434 /usr/lib/python3.12/http/client.py:296(_read_status) 29 0.000 0.000 0.865 0.030 {method 'readline' of '_io.BufferedReader' objects} 5 0.000 0.000 0.865 0.173 /usr/lib/python3.12/socket.py:693(readinto) 618/294 0.004 0.000 0.687 0.002 /usr/local/venv/lib/python3.12/site-packages/pyray/__init__.py:47(wrapped_func) Process elapsed in 2940.0 ms (profiled Python: 1851.9 ms) Startup timeline: process start 0.0 ms UI module loaded (interpreter + early imports) 840.0 ms +840.0 ms init_window entered (entrypoint imports complete) 1090.0 ms +250.0 ms init_window complete (window ready) 1670.0 ms +580.0 ms draw first frame 1960.0 ms +290.0 ms process exit 2940.0 ms +980.0 ms