Giter Site home page Giter Site logo

Comments (8)

pcamilo89 avatar pcamilo89 commented on June 18, 2024 1

Hello, I noticed that for me the community JSON always fails.

I know I'm a minority, but I have a 1mbit connection at home and a 4mb file at that speed would be downloaded in 32 seconds (a 5mb file would be 40sec, just to point out an upper limit to be safe).

So, can the timeout be longer tan 15 seconds, even if it's just 16–20 seconds it would cover download speeds of 2mbit or higher.

from lemmy-explorer.

pcamilo89 avatar pcamilo89 commented on June 18, 2024 1

@pcamilo89 give it a go now... they are smaller but there's a bunch.

That does work, I can see the list, and it slowly loads images and other data after, if some of the data fails to be retrieved it retries and gets it eventually.

The next image is just a reference for the retries (both for the lists of communities and images):
image

Tested a few times without cache active, and sometimes it can ask you to reload the page (I assume it has a bit of issues with the amount of requests), with cache active, there is no problem after the initial download, as it uses the cached data.

Thank you, now it is usable for low speed connections like mine.

I guess there is room to make improvements later, so in the case you decide to work on it, I will leave notifications for this issue on and can do a test later if needed.

from lemmy-explorer.

tgxn avatar tgxn commented on June 18, 2024 1

Yeah there is room to improve. This whole project I've not had to create any server backend, since it's all based on client-side JSON. I don't really plan on making a featured backend for this, cost and complexity ++.

I'm glad the fix made it possible to use, I added 3 re-tries on each payload in case they fail :) Maybe a future improve the loading, as the data grows I can see maybe doign more advanced splitting or minifying the data further to reduce size.

from lemmy-explorer.

tgxn avatar tgxn commented on June 18, 2024

Yeah that means it failed to load the ~4MB JSON file that has the community data in it. I'll extend the timeout to 15 seconds instead of the current 3.5 seconds.

from lemmy-explorer.

tgxn avatar tgxn commented on June 18, 2024

Yeah it's getting bigger and bigger :S

Compressed it is still around ~3MB

from lemmy-explorer.

tgxn avatar tgxn commented on June 18, 2024

I think the solution is to have either multiple files (small index file and separate files for each ~1000 communities) or try to remove some data from the communities json and seperate the metrics/metadata out.
Probably a combination of both.

Ideally the main load would be <1MB.

from lemmy-explorer.

tgxn avatar tgxn commented on June 18, 2024

my thinking on implementation, which I've written the code for tonight.

  • split list into files with ITEMS_PER_FILE
  • implement loader that will fetch these on-demand.

i guess the goal is to "make it work on slower connections" not "make it totally fast"

from lemmy-explorer.

tgxn avatar tgxn commented on June 18, 2024

@pcamilo89 give it a go now... they are smaller but there's a bunch.

#78

from lemmy-explorer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.