Big NostrGram performance gains from the database changes I made. You should find feeds loading quicker now.

Reply to this note

Please Login to reply.

Discussion

is there anything to do for the browser's load on ram? 😅

Don't scroll as far back? lol

Seriously, are you finding the ram use to be a problem?

actually i dont know if its ram issue or not. cuz when i check system resources it show 1.5gb ram used no matter how long i keep open the nostr.gram tab. the thing is nostr.gram starts slowing after a while. loses it's responsiveness some how

The primary thing that uses ram in NostrGram is when you scroll back in the feeds. The browser keeps all the notes loaded on the page and that requires more and more ram as you scroll back in time. Depending on the performance of your device, that will eventually slow things down as the browser has to move all the notes further down as new ones come in and you move around in the feeds. Outside of that I don't know what it might be. I can do some profiling and see if anything stands out.

Another thing to note is that if you filter for only embeds (audio/music/video) that will use a lot more ram because the embeds use a lot of ram. Once you change the filter and those notes get removed from the page then the ram is returned to the system, but while scrolling a feed of only embedded notes your ram usage will go much higher.

I have plenty of ram on my pc sitting there unused. but still it slows down. I don't know why tho

How long does it take before it starts to slow down, and what browser are you using? I keep NostrGram open all day and don't notice any slow-down issues. I use Opera for testing. The Chromium browsers are much better than FireFox or Safari (Safari is the *worst*) when it comes to scripting performance.

opera gx

Interesting. I did a ram check and even after scrolling a bunch of notes the ram is nowhere near 1gb. On the normal feeds it doesn't cross 100mb. If I filter for only embedded media it gets up to a few 100 mb.

just reopened a tab now to check how long does it take to slow down

Thanks. The more info I have the better chance I have of figuring out what the cause is.

do you use hardware accel on your browser?

No. My laptop is just a middle-of-the-road off-the-shelf laptop too. Not particularly powerful. Most of the coding I do runs on Linux servers and is scripting so no need for a workhorse machine.

think i found it. its not the client issue its my browser. it seems it cant handle watching/listening online streams on a tab while scrolling nostrgram on another. but still there are plenty of ram unused. weird. im gonna send this info to them

Ah ok. Glad you figured that out!

What changes did you make, just curious?

Just a few recommended changes on the db server for the vm max map count and a disabling transparent huge pages on the drive. I need to move the db over to the ssd drive on the db server but that's a more involved process.

I see, some configs and linuxy things. Got it thnx 🫡