Giter Site home page Giter Site logo

vs developit/redaxios? about thwack HOT 3 CLOSED

donavon avatar donavon commented on May 24, 2024
vs developit/redaxios?

from thwack.

Comments (3)

developit avatar developit commented on May 24, 2024 2

My 2 cents: I don't think there's enough going on in any of these minimal fetch wrappers to make a measurable difference in runtime performance. Requesting, downloading and parsing network requests is always going to take many orders of magnitude longer than merging a few objects and firing some events.

I wasn't aware of this library, but I like the events it fires and use something very similar in all of my stuff (and I keep writing them one-off every time...)

from thwack.

donavon avatar donavon commented on May 24, 2024 1

And I wasn't aware of @developit's redaxios. It's tiny.

As Jason has said, performance is going to be roughly the same, no matter what package you use. thwack@next is going to have a more robust addEventListener interface, with multiple level request mocking, replacing, blocking, etc, but probably not needed by most users.

redaxios is a good ultra-minimal alternative, although not 100% axios compatible (lacking interceptors), but again, probably not needed by most apps.

BTW, I have a TODO to look into using the EventTarget interface to lower my overhead.

from thwack.

developit avatar developit commented on May 24, 2024 1

@donavon sounds like some nice improvements.

RE EventTarget - I've tried a bunch of different techniques for reusing it as a generalized event interface, and never found a way that was materially better than a tight first party implementation. I'd have to peek at the code again to see how yours is implemented, but you might be able lift the optimizations from mitt, which should be about as small as you can get in JS.

from thwack.

Related Issues (9)

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.