Skip to content

ETL_DECLARE_DEBUG_COUNT increases RAM usage even when ETL_DEBUG_COUNT NOT defined #1057

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

Open
mnaydenov opened this issue Mar 28, 2025 · 0 comments
Assignees
Labels

Comments

@mnaydenov
Copy link

ETL_DECLARE_DEBUG_COUNT creates an object inside the classes it is used. Although the object is of empty type, still space needs to be allocated (so the member is addressable).

In real code we observed considerable overhead by this additional size. Mostly because objects like vector are not used in packed structs, the additional bytes lead to a snowball effect. Compared to an array + extra variables, we saw hundreds of bytes difference in the final binary, although few dozens vectors were used!

The solution is for ETL_DECLARE_DEBUG_COUNT be empty statement (when ETL_DEBUG_COUNT NOT defined). This can either be done via #ifdef or simply define it as empty and ; afer each place it is used.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Development

No branches or pull requests

2 participants