3 ms·
> We load all the data from local (indexed db), Ymmv with that. I've written a webnovel reader for myself before (never published it because of the obvious cop
by ffsm8 2y ago
> We load all the data from local (indexed db),
Ymmv with that. I've written a webnovel reader for myself before (never published it because of the obvious copyright issue of scraping the content)
My first approach was a Django SSR app, and it worked great for years. Since then I've remade it several times in various languages, attempting to get the smallest latency possible vs the developer experience.
In my testing, web requests were ultimately faster then indexeddb if the query was essentially pre-computed / simple select (i.e. persisting count attributes with via insert trigger etc).
My currently deployed version is java, and it's only role is to extract the userId from the jwt and feed the request params into the query, which is serialized to json by the DB, so the java application simply returns the data as string while setting the application/json media type.
I got full page load (pwa, so cached html/Js) to 8-15ms with that approach, querying the data from indexeddb took upwards from 25ms on all of my attempts, usually 50+ms as the amount of data increased later on
- harshithmul 2y agoWe also have tried initially to build an SSR and get data from the server but when in the process we figured every time making an API call was slowing things down and adding up a lot of latency even if start adding complicated algorithms to the API call caching. We think indexeddb also evolved in the recent years, but we will definitely keep an eye and keep improving with the available technologies.