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

Performance #3634

Merged
merged 8 commits into from
Oct 18, 2024
Merged

Performance #3634

merged 8 commits into from
Oct 18, 2024

Conversation

AlanGriffiths
Copy link
Collaborator

No description provided.

@AlanGriffiths AlanGriffiths requested a review from a team as a code owner October 14, 2024 14:15
@tarek-y-ismail
Copy link
Contributor

tarek-y-ismail commented Oct 16, 2024

Some things that I had in mind that could be added (just a rough draft), feel free to use/ignore/edit them as you see fit.

Mir splits into multiple threads at some point. One for rendering/compositing, one for input, one for XWayland events, one for Wayland events, etc... (as far as I understand). Focusing on the compositing and input threads, this improves performance (response time) by letting the two threads work independently. For example, the compositing thread might sleep until an application or another thing triggers an update. The input thread on the other hand, sleeps until an event arrives on the socket it listens to, and immediately calls the appropriate handler. This results in updates being delivered as soon as they are requested, and inputs being handled immediately.

In the case where two threads might overlap, critical sections are kept as small as possible with attention given to reduce locking overhead and time.


Almost all drawing/compositing (except for built-in decorations) is done via GPU if available to reduce CPU load and take advantage of GPUs' better efficiency and speed.

@AlanGriffiths
Copy link
Collaborator Author

Mir splits into multiple threads at some point

The performance trade-offs of threading is a vast, contentious, subject and a level of detail I don't think appropriate.

Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add it to explanation.md and to the TOC.

I would also like to see a blurb about using GPU acceleration, where possible.

We mentioned display planes / overlays as another theme that could be discussed?

doc/sphinx/explanation/performance.md Outdated Show resolved Hide resolved
doc/sphinx/explanation/performance.md Outdated Show resolved Hide resolved
doc/sphinx/explanation/performance.md Outdated Show resolved Hide resolved
@Saviq
Copy link
Collaborator

Saviq commented Oct 16, 2024

I wouldn't be averse to merging Performance and Energy efficiency into one page, as there's only so much that is different between them…

@AlanGriffiths AlanGriffiths force-pushed the MIRENG-504-Draft-the-performance-document branch from 598130c to c3c0298 Compare October 16, 2024 11:24
@AlanGriffiths
Copy link
Collaborator Author

Please add it to explanation.md and to the TOC.

I presume that's explanation/index.md?

@AlanGriffiths
Copy link
Collaborator Author

I wouldn't be averse to merging Performance and Energy efficiency into one page, as there's only so much that is different between them…

Strange, I don't see there being much in common between them 🤷‍♂️

@AlanGriffiths AlanGriffiths requested a review from Saviq October 16, 2024 16:32
Copy link
Collaborator

@Saviq Saviq left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@Saviq Saviq added this pull request to the merge queue Oct 18, 2024
Merged via the queue into main with commit 46722a3 Oct 18, 2024
38 checks passed
@Saviq Saviq deleted the MIRENG-504-Draft-the-performance-document branch October 18, 2024 09:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants