Skip to content

Don't disable DCE#2112

Draft
vincentbernat wants to merge 4 commits intomainfrom
feature/dce-elimination
Draft

Don't disable DCE#2112
vincentbernat wants to merge 4 commits intomainfrom
feature/dce-elimination

Conversation

@vincentbernat
Copy link
Member

@vincentbernat vincentbernat commented Nov 22, 2025

Akvorado binaries are larger than they should be because dead code elimination is disabled because of using reflect.MethodByName or reflect.Method. This needs to be fixed everywhere.

This requires usage of `reflect.MethodByName`, which prevents DCE. This
does not really matter as DCE is not smart enough to detect we don't use
it, but the day we have an alternative not supporting functions call, we
would be ready. Or maybe there is an alternative. Or we could use
`strings.ReplaceAll()` instead.
This is a user breaking change, but I suppose not many people were using
the templating system for avatar/logout URLs.
@vincentbernat vincentbernat force-pushed the feature/dce-elimination branch from d0fbfb4 to 1490f0b Compare November 22, 2025 15:10
@codecov
Copy link

codecov bot commented Nov 22, 2025

Codecov Report

❌ Patch coverage is 98.03922% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.05%. Comparing base (756d0a9) to head (1490f0b).

Files with missing lines Patch % Lines
console/clickhouse.go 94.44% 0 Missing and 1 partial ⚠️
orchestrator/clickhouse/migrations_helpers.go 98.11% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2112      +/-   ##
==========================================
- Coverage   84.08%   84.05%   -0.03%     
==========================================
  Files         227      227              
  Lines       13808    13820      +12     
==========================================
+ Hits        11611    11617       +6     
- Misses       1499     1507       +8     
+ Partials      698      696       -2     
Flag Coverage Δ
e2e 43.45% <53.92%> (+0.09%) ⬆️
unittests 83.32% <98.03%> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@vincentbernat vincentbernat force-pushed the feature/dce-elimination branch from bf326e4 to efce01e Compare November 23, 2025 07:31
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.

1 participant