Skip to content

Fix multiple memory allocations - #49

Open
danko-master wants to merge 1 commit into
ozontech:mainfrom
danko-master:refact-split-time-range-by-interval
Open

danko-master wants to merge 1 commit into
ozontech:mainfrom
danko-master:refact-split-time-range-by-interval

Conversation

@danko-master

Copy link
Copy Markdown

make test

Before:

ok      github.com/ozontech/ch-rollup/internal/utils/time       1.054s
ok      github.com/ozontech/ch-rollup/pkg/rollup        1.077s

After:

ok      github.com/ozontech/ch-rollup/internal/utils/time       1.020s
ok      github.com/ozontech/ch-rollup/pkg/rollup        1.038s

Fix the problem with the current implementation is multiple memory allocations due to the constant expansion of the result slice via append inside the loop.

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