News for hackers. Stuff that matters.
Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by ecuaflo on Wednesday June 12, 2024 @07:51AM (#40657003)
unfortunately in the browser it needs to be downloaded so you’re stuck with indexeddb
Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by sgbeal on Wednesday June 12, 2024 @11:11AM (#40659004)
> unfortunately in the browser it needs to be downloaded so you’re stuck with indexeddb

That argument implies that we're stuck with the browser's single built-in home page because every other web page has to be downloaded.

How is having to download sqlite3.wasm any different from having to download HTML, CSS, JS, images, etc.?

Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by w0m on Wednesday June 12, 2024 @11:23AM (#40659141)
> How is having to download sqlite3.wasm any different from

'unnecessary' file size. K matter on the web still.

I'm not normally a web guy, but from https://sqlite.org/download.html it looks like it's ~800k extra added to initial page load? Based on average mobile speed in US of 97.09Mbps; that's an extra half second added to initial page load. That's not trivial; maybe an extra 15% bounce rate on initial hits.

Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by sgbeal on Wednesday June 12, 2024 @11:37AM (#40659300)
> ~800k extra added to initial page load?

If you're serving it uncompressed, which no production-grade site will (for a given definition of "no"/"none").

> K matter on the web still.

Not, i opine, for the types of apps which want to host client-side databases. These are client-side applications, not "web pages."

Even a bare-bones, database-less google.com is now 3.14mb uncompressed (1.32 compressed), and that's not counting the pieces which uBlock Origin keep from loading. It loads somewhere around 2MB (uncompressed) of JS.

Last i checked, gdrive downloaded some 14mb to get up and running.

> that's an extra half second added to initial page load. That's not trivial;

We'll have to agree to disagree on whether half a second extra initial-hit-only load time is trivial.

Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by fwip on Wednesday June 12, 2024 @01:02PM (#40660371)
> If you're serving it uncompressed

That 847 KB is actually the size of the (compressed) zip file, but it does contain other files. The compressed WASM + the JS to load it is probably about 500K, depending on the specifics of compression & minification.

Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by Digit-Al on Wednesday June 12, 2024 @02:00PM (#40661016)
Makes me laugh. When I got my first computer in 1987 it took so long to load a small game from cassette that I could go downstairs, boil a kettle, make a cuppa, and bring it back to my room, and the game would be just about finished loading. Now people are moaning about an extra half a second lol

How things change.

Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by paulddraper on Wednesday June 12, 2024 @02:32PM (#40661317)
No, the narrative here is that things used to be fast and idiot JS devs have made everything bloated and slow.
Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by andrepd on Wednesday June 12, 2024 @07:35PM (#40664344)
Computers are thousands to millions of times faster. So yes, that's a true assessment.
Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by paulddraper on Wednesday June 12, 2024 @08:37PM (#40664727)
> millions of times faster

Unless you had a 3KHz processor (and no processor ever had that), that statement is just not true.

Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by andrepd on Friday June 14, 2024 @03:04AM (#40678277)
It's not about raw clock speed, or a Zen 4 would be as fast as a Pentium 4 :)
Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by jacobprall on Wednesday June 12, 2024 @05:07PM (#40663143)
It's a matter of use case - for simple web page or even a lightweight client-side app, maybe too big. But for tool with heavy data processing, I could see it being quite useful.
Re:Why SQLite Is Taking over with Brian Holt and Marco Bambini by iansinnott on Wednesday June 12, 2024 @11:17AM (#40659086)
It's too bad WebSQL never took off, as that was sqlite built in to the browser.

From memory the wasm binary of wa-sqlite is ~1mb, which is certainly not nothing but is an acceptable one-time download size for many web apps. I've seen websites with single image files larger than that. Not an advocating for more bloated web apps, but a sqlite download might not be a deal breaker.