sduzh opened a new issue #6827: URL: https://github.com/apache/incubator-doris/issues/6827
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-doris/issues?q=is%3Aissue) and found no similar issues. ### Version master a6e905eae92f42b060f3d21a2c5ad535d099661a ### What's Wrong? [TabletColumn](https://github.com/apache/incubator-doris/blob/a6e905eae92f42b060f3d21a2c5ad535d099661a/be/src/olap/tablet_schema.h#L30) is the most fundamental and basic data structure in Doris. At runtime, there may be tens of thousands of TabletColumn objects in memory, so reducing its size has a very important role in reducing memory usage. But currently, a TabletColumn object takes up at least 120 bytes, with many unnecessary memory paddings, and some of the member variables are not used in most cases. ### What You Expected? - Reorder class members to remove unnecessary memory paddings - Choose appropriate types, e.g, using `uint8_t` instead of `int32_t` for [_precision](https://github.com/apache/incubator-doris/blob/a6e905eae92f42b060f3d21a2c5ad535d099661a/be/src/olap/tablet_schema.h#L90) - Remove unused members - Avoid allocating memory for rarely used member variables, e.g, [_sub_columns](https://github.com/apache/incubator-doris/blob/a6e905eae92f42b060f3d21a2c5ad535d099661a/be/src/olap/tablet_schema.h#L106) ### How to Reproduce? _No response_ ### Anything Else? _No response_ ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
