Skip to content
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

Optimize StagedMetadatas conversion #3330

Merged
merged 3 commits into from
Mar 5, 2021
Merged

Optimize StagedMetadatas conversion #3330

merged 3 commits into from
Mar 5, 2021

Conversation

vdarulis
Copy link
Collaborator

@vdarulis vdarulis commented Mar 5, 2021

What this PR does / why we need it:

This is a ton of ugly code to speed up metadata mapping from proto to domain level structs, and is on very hot path.

name                                    old time/op    new time/op    delta
Metadata_FromProto/large_metadatas-12      101ns ± 1%      55ns ± 4%  -46.22%  (p=0.000 n=9+10)
Metadata_FromProto/small_metadatas-12     46.9ns ± 1%    28.9ns ± 2%  -38.28%  (p=0.000 n=9+10)
Metadata_FromProto/storage_policies-12    56.8ns ± 2%    26.3ns ± 1%  -53.64%  (p=0.000 n=10+9)
Metadata_FromProto/all-12                  200ns ± 1%     105ns ± 1%  -47.80%  (p=0.000 n=8+10)

Special notes for your reviewer:

Does this PR introduce a user-facing and/or backwards incompatible change?:


Does this PR require updating code package or user-facing documentation?:


@vdarulis vdarulis merged commit 7038cda into master Mar 5, 2021
@vdarulis vdarulis deleted the v/metadatas branch March 5, 2021 16:57
soundvibe pushed a commit that referenced this pull request Mar 9, 2021
* master: (22 commits)
  Remove deprecated fields (#3327)
  Add quotas to Permits (#3333)
  [aggregator] Drop messages that have a drop policy applied (#3341)
  Fix NPE due to race with a closing series (#3056)
  [coordinator] Apply auto-mapping rules if-and-only-if no drop policies are in effect (#3339)
  [aggregator] Add validation in AddTimedWithStagedMetadatas (#3338)
  [coordinator] Fix panic in Ready endpoint for admin coordinator (#3335)
  [instrument] Config option to emit detailed Go runtime metrics only (#3332)
  [aggregator] Sort heap in one go, instead of iterating one-by-one (#3331)
  [pool] Add support for dynamic, sync.Pool backed, object pools (#3334)
  Enable PANIC_ON_INVARIANT_VIOLATED for tests (#3326)
  [aggregator] CanLead for unflushed window takes BufferPast into account (#3328)
  Optimize StagedMetadatas conversion (#3330)
  [m3msg] Improve message scan performance (#3319)
  [dbnode] Add reason tag to bootstrap retries metric (#3317)
  [coordinator] Enable rule filtering on prom metric type (#3325)
  Update m3dbnode-all-config.yml (#3204)
  [coordinator] Include Type in RollupOp.Equal (#3322)
  [coordinator] Simplify iteration logic of matchRollupTarget (#3321)
  [coordinator] Add rollup type to remove specific dimensions (#3318)
  ...
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.

2 participants