Skip to content
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.

perf: improve performance of the persistent cache used in forking #2811

Merged
merged 1 commit into from
Apr 7, 2022

Conversation

jeffsmale90
Copy link
Contributor

@jeffsmale90 jeffsmale90 commented Apr 4, 2022

This PR makes the level get stream's 'lt' argument more specific in order to retrieve fewer entries and convert block hash to Buffer type immediately on initialization (rather than every time we get / put an entry).

@jeffsmale90 jeffsmale90 force-pushed the improve_persistent_cache_get_performance branch 2 times, most recently from 9d28c3e to ca31b75 Compare April 6, 2022 03:07
@jeffsmale90 jeffsmale90 changed the title Make 'lt' parameter in database query more specific perf: improve performance of persistent cache used in forking Apr 6, 2022
@jeffsmale90 jeffsmale90 changed the title perf: improve performance of persistent cache used in forking perf: improve performance of the persistent cache used in forking Apr 6, 2022
- Make 'lt' argument more specific in order to retrieve less entries
- Convert block hash to Buffer type immediately on initiatisation (rather than every time we get / put an entry)
@jeffsmale90 jeffsmale90 force-pushed the improve_persistent_cache_get_performance branch from ca31b75 to 0a4947b Compare April 6, 2022 03:12
@jeffsmale90 jeffsmale90 marked this pull request as ready for review April 6, 2022 03:23
@jeffsmale90
Copy link
Contributor Author

Running the convex-shutdown-simulation, I'm seeing a 3.5% performance improvement (~870ms) with this change.

@jeffsmale90 jeffsmale90 merged commit 58b9024 into develop Apr 7, 2022
@jeffsmale90 jeffsmale90 deleted the improve_persistent_cache_get_performance branch April 7, 2022 23:44
davidmurdoch pushed a commit that referenced this pull request Apr 8, 2022
)

No change in behaviour, but makes working with local forks ever so slightly faster.
MicaiahReid pushed a commit to domob1812/ganache that referenced this pull request Apr 20, 2022
…ufflesuite#2811)

No change in behaviour, but makes working with local forks ever so slightly faster.
davidmurdoch pushed a commit that referenced this pull request Apr 22, 2022
)

No change in behaviour, but makes working with local forks ever so slightly faster.
davidmurdoch pushed a commit that referenced this pull request Apr 22, 2022
)

No change in behaviour, but makes working with local forks ever so slightly faster.
jeffsmale90 added a commit that referenced this pull request Apr 26, 2022
)

No change in behaviour, but makes working with local forks ever so slightly faster.
tenthirtyone added a commit that referenced this pull request May 5, 2022
* feat: create version-check package

* attempt CI fix

* fix

* Add some missing colors

* small refactor

* chore(release): publish v7.0.4

ganache@7.0.4

* perf: improve performance of the persistent cache used in forking (#2811)

No change in behaviour, but makes working with local forks ever so slightly faster.

* chore: remove outdated warning about EIP-1193 fork providers (#2856)

closes #2558

* ci: automated release improvements (#2892)

* add vX.x.x tag on release

* merge master into develop after successful publish

* add action to import TrufBot GPG keys for signed commits

* squashme - VersionChecker class plated

* squashme stub unit tests

* feat: create version-check package

* attempt CI fix

* fix

* Add some missing colors

* small refactor

* squashme unit test start

* squashme semver unit tests

* squashme fetch wired up

* squashme cleaning up a bit

* comment out failing semvers

* log unit tests

* test e2e, add semver package

* snipe errant branches

* replace init race condition test with sinon spy

* fail silently if server unavailable

* final preflight before squash and PR

* add constructor and config types

* disable if in CI

* logVersionMessage for --version

* remove the disable in CI... because it actually disables in CI... for everything ::facepalm::

* add to ganache, fix versionMesage string for yargs

* add version-check back to cli

* handle invalid semver

* only setLatestSemver if valid semver

* clean up my testing changes that were accidentally committed

* bump @ganache/colors, shrinkwrap

* add clean and validate function, reduce function checks

* disable if currentVersion is not valid semver

* validate and clean semver at entry

* sparse config test

* alpha and beta, v strings

* Update src/packages/version-check/index.ts

Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>

* move banner to end of CLI, before starting message

* fix session being held open after stopping in vs code

* remove scope from package.json

* fix startGanache banner log location. Add to README

* fix req.end holding a connection open that prevents starting multiple instances

Co-authored-by: Robot <robot@trufflesuite.com>
Co-authored-by: jeffsmale90 <6363749+jeffsmale90@users.noreply.github.com>
Co-authored-by: g. nicholas d'andrea <gnidan@users.noreply.github.com>
Co-authored-by: Micaiah Reid <micaiahreid@gmail.com>
Co-authored-by: tenthirtyone <alexsherbuck@gmail.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants