Summary: | XCB should construct requests directly in the output buffer if there is room | ||
---|---|---|---|
Product: | XCB | Reporter: | Ian Osgood <iano> |
Component: | Library | Assignee: | Jamey Sharp <jamey> |
Status: | RESOLVED WONTFIX | QA Contact: | |
Severity: | normal | ||
Priority: | high | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Ian Osgood
2006-06-30 22:33:14 UTC
Thanks for recording this bit of conversation, Ian. You and I chatted about this at some point, but I want to record my reasoning for future reference. I claim XCB stubs should not write directly to the output queue, because that exposes too much of the implementation of the transport layer. It destroys the atomicity properties of the API, making the underlying locks visible; and it constrains us to a limited set of output-queue configurations, not to mention forcing us to have an output queue in the first place. It also increases the code size of every single generated stub. I claim the right place to eliminate a copy is between the caller and the stub, where all the request parameters are passed through the stack at native alignment before being copied into a naturally-aligned buffer. If we inline the stubs in the caller, as suggested in bug #6687, then that copy will be gone and we should see the same kind of performance boost as this bug's suggestion would provide. Meanwhile, we have ways of reducing the cost of the memcpy in xcb_send_request, and we just need to implement them. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.