Giter VIP home page Giter VIP logo

Comments (3)

cotestatnt avatar cotestatnt commented on May 30, 2024 1

Thank you @Blueforcer
Your comments are very valuable and help me to develop the library in the right direction.

Regarding the methods you mentioned, I added them to make things easier for newbie users, but you can certainly avoid it and load/save the options all together by directly opening the config.json file using the ArduinoJson library.

As for the addOption() method instead, for now it's still necessary to open the file once for option (in read mode only if option is already present), but your comment gave me an idea that I'll work on as soon as possible.

from esp-fs-webserver.

cotestatnt avatar cotestatnt commented on May 30, 2024 1

Hi @Blueforcer
I've just uploaded an updated customHTML.ino example where options are loaded (and optionally saved) all in once using ArduinoJson library.

Unfortunately I haven't had the chance to work on the addOption() method yet.

Up now, every time the method is called, the config.json file is read and only if the option is not already present is it also written.
In my tests the library seems fast enough even with very large config.json file (5/10 kbytes), but avoiding opening the file if not neeed it's definitely a better option.

from esp-fs-webserver.

cotestatnt avatar cotestatnt commented on May 30, 2024

Hi @Blueforcer.
I know the answer is very late, but finally in the latest version I have drastically reduced the number of accesses to the configuration file (only once).

from esp-fs-webserver.

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.