Comments (6)
As the issue is very erratic - it might be one write that takes long and all before and after are smooth - I don't see how to "throttle when it gets too slow". For less powerful machines, 500 puts at a time might take too long, so maybe there is room for some mechanism that keeps the median bulkPut below 100ms but that's another issue.
from nostroid.
Apparently events get downloaded repeatedly whenever the SharedWorker starts. Observed from the relay side "53000 events were sent in 153ms", which definitely is too big a burst for the client.
from nostroid.
While investigating this I noticed a lot of the memory allocations come from Dexie. I’m also investigating what improvements, if any could be had, from using a RWLock to have a way to control the reads and writes
from nostroid.
After taking some time to ‘reset’ my brain, I’ve managed to achieve (in my opinion, after testing it for a good amount of time) a more consistent experience.
Demo: https://nostroid-test.vercel.app/
Currently preparing to commit my changes to my fork, and create a PR once I clean up a couple things and pull in the latest commits.
from nostroid.
The heap allocations still isn’t great, which I have a few ideas on how to minimize them, but the bulk of them come from Dexie and the crypto libs it appears.
For reference, here’s the bar graph on this repos deployed build.
Both profiles were taken starting from the very start of the page render, to ~1-1.5 mins after it stops getting new events (around 15k)
from nostroid.
Your deployment indeed feels smoother.
The nostr library I think is part of the problem as switching it for another one had a dramatic impact on performance but that other one wasn't ready for all the features yet. It might be worth giving it another try.
from nostroid.
Related Issues (20)
- Pick a FOSS license HOT 1
- Reduce Layout Shifts HOT 2
- Make nostr-tools work as submodule HOT 1
- remove using xxx-submodule scripts from dev guide docs!
- Handle lack of IDB HOT 2
- Fix Circular dependency - or at least make sure it's unproblematic HOT 2
- Disable default accounts HOT 1
- Creating Profiles is broken
- Feature: Subscribe to thread
- sqlite via wasm worker HOT 3
- Feature: nos2x/alby/nip07 support HOT 1
- Bug: Error loading data worker in Firefox HOT 1
- Upgrade PWA plugin
- Keyboard interaction with mentions is broken HOT 1
- Show reply counter in TextNotes
- Thread navigation is flaky HOT 1
- Bug: Thread view does not interpret positional replies
- Fetch missing events from network
- In thread view, show missing events with place holders
- App appears to never download some events
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nostroid.