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 memory #75

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft

Optimize memory #75

wants to merge 16 commits into from

Conversation

johningve
Copy link
Member

Various memory optimizations.

Before:
profile (1).pb.gz

After:
profile.pb.gz

@johningve johningve changed the title Optimize mem Optimize memory Aug 19, 2022
@codecov-commenter
Copy link

Codecov Report

Merging #75 (e9ffe83) into master (6152764) will decrease coverage by 2.20%.
The diff coverage is 56.18%.

@@            Coverage Diff             @@
##           master      #75      +/-   ##
==========================================
- Coverage   57.81%   55.61%   -2.21%     
==========================================
  Files          70       76       +6     
  Lines        6427     7462    +1035     
==========================================
+ Hits         3716     4150     +434     
- Misses       2424     3006     +582     
- Partials      287      306      +19     
Flag Coverage Δ
unittests 55.61% <56.18%> (-2.21%) ⬇️

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

Impacted Files Coverage Δ
consensus/byzantine/byzantine.go 1.92% <0.00%> (-0.21%) ⬇️
crypto/bitfield.go 96.61% <0.00%> (-3.39%) ⬇️
genesis.go 100.00% <ø> (ø)
handel/session.go 0.00% <0.00%> (ø)
internal/cli/run.go 16.12% <0.00%> (ø)
leaderrotation/carousel.go 3.77% <0.00%> (-0.49%) ⬇️
leaderrotation/reputation.go 3.07% <0.00%> (-0.26%) ⬇️
metrics/clientlatency.go 2.63% <0.00%> (-0.94%) ⬇️
metrics/plotting/clientlatency.go 0.00% <0.00%> (ø)
metrics/plotting/reader.go 0.00% <ø> (ø)
... and 73 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

This removes the need to declare what "interface" or type a module
provides to the module system, thus being more in line with the "Go way"
of implicit interfaces. The module system looks for a module with a
compatible type. If multiple modules implement the same type, the module
system chooses the one that was added to the builder last.
If we are going to use a view context for voting, then we need to be in
the correct view before we start the voting process.
Otherwise, the vote could be canceled by the following view change.
This decouples contexts from the synchronizer and makes them listen for
events on the event loop.
This commit aims to make the eventloop more flexible by allowing both
async and sync handlers again. Handlers can be made async by passing a
RunAsync handler option. Furthermore, observers have been replaced by a
WithPriority handler option.
Smart contexts that listen for timeouts
This avoids many memory allocations
@meling
Copy link
Member

meling commented Oct 3, 2022

@johningve Could you resolve the conflicts in this PR before I review it?

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.

3 participants