Giter Club home page Giter Club logo

Comments (2)

batpad avatar batpad commented on July 19, 2024

Starting to enumerate, we can create separate tickets for these if needed:

Looking through, we actually have a LOT of instances where we make calls with a high limit value. I think for MOST of them, we just want to switch to doing pagination on the frontend. For MOST cases, it's really harmless - we need to display everything on a map, or in a dropdown, we know there will likely not be many results, but don't want to cap it, so we set a high limit -- just setting pagination with a page size of 100 or 200 on the frontend should be fine for these.

There's cases like the call for "Active Personnel": https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L576 that need to fetch all items to display in a single chart - all these cases I think we should just handle in the same way we did CSV pagination.

I think then the only one that I'm really concerned about is the fetching of Appeals like https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L232 - I can't see a good reason why we need to fetch ALL appeals from the backend. We need to dig more into that and see if we can swap out the logic there, perhaps by doing some aggregation on the backend. For the rest, I would advocate finding a good pattern to just moving all these instances to doing pagination managed by the frontend.

Also, @frozenhelium, could you just comment on https://github.com/IFRCGo/go-frontend/blob/develop/src/root/actions/index.js#L70 getRegionalProjects - if this is needed, we can use the same frontend pagination approach.

cc @frozenhelium @tovari @szabozoltan69 @tnagorra

from go-web-app.

tovari avatar tovari commented on July 19, 2024

Would you mind to review @batpad, if these still need to be resolved? Thanks.

from go-web-app.

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.