alex,
@alex@gleasonator.com avatar

Guys gleasonator.dev is somewhat usable

opphunter88,

@alex Honestly at this point it can't perform worse than this site ☠️

alex,
@alex@gleasonator.com avatar

I gave up on SQLite and swiched to Postgres and it magically started working after months of fighting.

caekislove,
@caekislove@gleasonator.com avatar

@alex Blasphemy!

alex,
@alex@gleasonator.com avatar

@caekislove You can pass a DATABASE_URL now and choose sqlite://db.sqlite3 or postgres://localhost:5432/ditto and decide for yourself how you'd prefer to suffer.

alex,
@alex@gleasonator.com avatar

@caekislove The main problem with SQLite is 10 minute long queries that should take 0.01s. Re-running the exact same query again takes 0.01s. This is in a 40GB database. Then I found a 20 year old thread of people complaining about how SQLite relies on OS disk cache and it can do that sometimes.

My original idea was to prune the db so it's always small, keeping only the last 7 days of data. But the other problem with SQLite is that it destroys performance to delete things! So whenever you run that cron it freezes the whole application for all users.

It could probably have been improved by running a worker pool on top of it. But you would still get 10 minute queries in some threads, it just wouldn't block the others.

alex,
@alex@gleasonator.com avatar

@caekislove Meanwhile we're working on LMDB integration. But I wanted this project to exist in the near future.

gentoobro,
@gentoobro@gleasonator.com avatar

@alex @caekislove ram-backed tmpfs?

alex,
@alex@gleasonator.com avatar
caekislove,
@caekislove@gleasonator.com avatar

@alex Damn I guess Hacker News lied to me when they said there's no problem in the world that can't be solved by SQLite!

(I never believed their lies about Rust being good)

alex,
@alex@gleasonator.com avatar

@caekislove I think it could be, but you have to do a lot of engineering around it. You'd have to manage many smaller SQLite files and then route requests to it.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • InstantRegret
  • ethstaker
  • magazineikmin
  • GTA5RPClips
  • rosin
  • modclub
  • Youngstown
  • ngwrru68w68
  • slotface
  • osvaldo12
  • kavyap
  • mdbf
  • thenastyranch
  • JUstTest
  • everett
  • cubers
  • cisconetworking
  • normalnudes
  • Durango
  • anitta
  • khanakhh
  • tacticalgear
  • tester
  • provamag3
  • megavids
  • Leos
  • lostlight
  • All magazines