Code Monkey home page Code Monkey logo

Comments (3)

si458 avatar si458 commented on July 23, 2024 1

ok this is intresting.
just did my own experiment and indeed increasing those values does speed up the upload!
in theory we can also increase the file download too! so ill look into that
i found setting the value to 65565 is better than 0x100000
because 0x100000 is 1,048,576, and you have to remember this is on the handlebar files which is client side!
so the bigger the buffer the more memory the client side would need in there browser!
but yes indeed just increasing from 16384 to 65565 does make a difference so nice catch!

from meshcentral.

HuFlungDu avatar HuFlungDu commented on July 23, 2024

Thanks Simon, that is a significant improvement!

I will say, 1,048,576 is still only 1MB, and by my testing meshcentral itself already takes up ~200MB on the user's device. Since the buffer gets discarded immediately after use and cleaned up by the garbage collector shortly afterward, I don't think that .5% increase during an upload operation should be too much of a burden, and it is much faster. I tried uploading a 10GB file with the 1MB block size and didn't see any noticeable jump in memory usage over the old 16k.

Admittedly, though, that's hardly an exhaustive test, and there could be edge cases I'm missing, hence the deference, just something to think on. Super happy to just have the 65k, though!

from meshcentral.

si458 avatar si458 commented on July 23, 2024

For my testing, i used my pi zero w (on wifi too) and uploaded a 58mb file. Originally, it took about 10 minutes, but after changing it to the 65565, it only took 3 minutes! Which is a big improvement!

from meshcentral.

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.