Bug 10167

Summary: Code generator should not generate 0-length padding
Product: XCB Reporter: Ian Osgood <iano>
Component: LibraryAssignee: Jamey Sharp <jamey>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: medium CC: jamey, josh
Version: 1.0   
Hardware: All   
OS: All   
Whiteboard:
i915 platform: i915 features:

Description Ian Osgood 2007-03-02 22:23:58 UTC
One of XCB's performance bottlenecks is the memcpy inside of write_block.  The code generator often will include zero-length padding in the case where no padding is required, due to not knowing the pre-aligned sizes of the relevant types.  We should make the generator smart about this. Jamey did some preliminary measurements; it would be a measurable performance gain.  (cf. mailing list)
Comment 1 Jamey Sharp 2007-03-03 14:30:36 UTC
I provided measurements of the effect of fixing both this bug and #6686 in the message "best-case X no-op performance measurement":
http://lists.freedesktop.org/archives/xcb/2006-June/001697.html
Comment 2 Daniel Stone 2019-02-16 13:04:05 UTC
If this is only for micro-optimisation of request-heavy workloads, there's no great need to do that. But if anyone's really motivated, hey, this can remain for historical interest.

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.