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

fix: cancel inflight requests if database is canceled #410

Closed
wants to merge 19 commits into from

Conversation

nolanlawson
Copy link
Owner

If database.close() is called, we should cancel any inflight IDB/fetch operations. This should eventually allow us to start setting up the database sooner than a microtask, since we can cancel the request if the user decides to change the data source.

Copy link

github-actions bot commented Mar 17, 2024

📊 Tachometer Benchmark Results

Summary

benchmark-total

  • emoji-picker-element-change-tab: unsure 🔍 -1% - +1% (-0.17ms - +0.21ms)
    this-change vs tip-of-tree
  • emoji-picker-element-database-interactions: unsure 🔍 -7% - +4% (-6.87ms - +3.79ms)
    this-change vs tip-of-tree
  • emoji-picker-element-first-load: unsure 🔍 -5% - +4% (-2.38ms - +1.92ms)
    this-change vs tip-of-tree
  • emoji-picker-element-second-load: unsure 🔍 -7% - +4% (-2.80ms - +1.40ms)
    this-change vs tip-of-tree

Results

emoji-picker-element-change-tab
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
33.33ms - 33.63ms-unsure 🔍
-1% - +1%
-0.17ms - +0.21ms
tip-of-tree
tip-of-tree
33.35ms - 33.58msunsure 🔍
-1% - +1%
-0.21ms - +0.17ms
-
emoji-picker-element-database-interactions
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
96.89ms - 104.23ms-unsure 🔍
-7% - +4%
-6.87ms - +3.79ms
tip-of-tree
tip-of-tree
98.23ms - 105.97msunsure 🔍
-4% - +7%
-3.79ms - +6.87ms
-
emoji-picker-element-first-load
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
50.38ms - 53.53ms-unsure 🔍
-5% - +4%
-2.38ms - +1.92ms
tip-of-tree
tip-of-tree
50.72ms - 53.65msunsure 🔍
-4% - +5%
-1.92ms - +2.38ms
-
emoji-picker-element-second-load
VersionAvg timevs this-change
vs tip-of-tree
tip-of-tree
this-change
34.90ms - 37.89ms-unsure 🔍
-7% - +4%
-2.80ms - +1.40ms
tip-of-tree
tip-of-tree
35.62ms - 38.57msunsure 🔍
-4% - +8%
-1.40ms - +2.80ms
-

tachometer-reporter-action v2 for Benchmarks

Copy link

github-actions bot commented Mar 17, 2024

Size Change: +420 B (+1%)

Total Size: 37.1 kB

Filename Size Change
./bundle.js 37.1 kB +420 B (+1%)

compressed-size-action

@nolanlawson
Copy link
Owner Author

I'm not sure I can actually get this to work properly. It's so much added complexity, and it still doesn't really improve the perf by doing what I'd really like to do, which is fire off the initial HTTP request before rendering.

It's a nice idea, but it's probably too complex to implement.

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.

None yet

1 participant