Webstorage or nodewebkit for file access?

  • Which is faster and recommended for loading and writing data consistently?

    Webstorage? or Nodewebkit?

  • NodeWebKit is a platform and offer file access. However NodeWebKit plugin only works on the NodeWebkit platform. If you are using say Chrome, Crosswalk, Ejecta, HTML.... everything but NodeWebkit platform then the plugin won't store anything.

    So the question isn't which is stable(which is the same). It's what do you need? If your going to run on anything else than the NodeWebKit platform then you have to use WebStorage. If your only using NodeWebkit then do you need more advanced storage. I suggest reading up more on the plugins themselves to determine your needs.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Im exporting via nodewebkit for desktop pc. Both options should work, but I think that there must be a methot that can manage memory in a convenient way to do loads and writes every second, to avoid lags of hard disk access.

  • Why do you have to keep writing every second? The most convenient way to manage memory should be saving at certain points, or when the user exits or something.

  • Its an ebook. It needs to save the page and title at closing the window, but the trigger to do that don't exist. So, what I'm trying to do is to save automaticly every 5 seconds, or one time for each page swapping.

  • I would suggest that you save this kind of info when arriving on the page if possible, as for webstorage vs node-webkit filesave, both would work, but the noide webkit will have a visible file, while the webstorage will be more transparent.

  • If you can use WebStorage it's definitely preferable over node-webkit specific features, since if you ever want to port your project to a different platform it will just work, instead of the node-webkit specific bits breaking and needing rewriting.

    You should not redundantly write to storage on a timer. Just write if the value changes! You don't need a specific trigger for that, you can either use "Trigger once" or compare to the old value and only update when it's different.

  • Thanks for the reply, that's exactly what I'm doing, but some times while the page is changing, and the program saves titles, root directory and page number, a little slowdown access appears and I think this will be more noticeable when the file is storing a colleccion of books and paths. That is a fisical problem for sure, and I hope one day you can add a "windows on close" or "on exit" trigger to construct2, it will saves a lot.

  • If each "page" or "book" is a layout. On layout changes/on start of layout...save.

    Otherwise anytime the page changes, save. Don't need to change any other time unless you give the user a few bookmarks to save certain pages. But then the user would choose when to save those.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)