- Notifications
You must be signed in to change notification settings - Fork1.5k
-
As pyscript already has fs module it will be great to have official way to use the Origin Private File System in the browser. It is much faster for big files as well more secure than indexedDB api, and can be made to work on all browsers including mobile devices. |
BetaWas this translation helpful?Give feedback.
All reactions
Replies: 2 comments 4 replies
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
That API is basically designed to work only in a Dynamic Worker (not Shared, not Service, just Worker) due its ability to block behind the scene while locking the OS file system. None of our current offer/APIs uses the leading tab/main pattern as that would require a lot of orchestrationbut it's not excluded we might just do that in the near future ... meanwhile, all our APIs to deal with the OS native FS or the browser IndexedDB feature should "just work", so I wonder what is it exactly that you are after, as that OPFS discussion is something I am aware of due SQLite on browsers integration, but use cases around it are kinda obscure to me ... so, do yu mind expanding on that? |
BetaWas this translation helpful?Give feedback.
All reactions
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
OK, so the native FS is supported only by Chromium browser and even not available on Android so no so usable up today for what i am doing. IndexedDB is so slow on big "files" on my tests a fiction novel text size on medium android device gets lots of seconds to be saved, reads are fine but not sure if gets lots of "files" what will be. So for persistence and better performance as well better device/browser support seems OPFS is kinda good solution. So because I need some solution aniway, made one till there are official one, no pretending to be good :) as i am not professional developer: |
BetaWas this translation helpful?Give feedback.
All reactions
-
I am not sure I am following but you are using my implementation of awaitinterpreter.mountNativeFS(mount_path,dirHandle)#nativefs so it looks like you just created some sort of path utility based on what we offer already, am I correct? If that's the demo/case, that's cool and we should think about integrating it in ourfs API, I suppose, but we need to discuss if that's what we want too. On the other hand, with |
BetaWas this translation helpful?Give feedback.
All reactions
-
First want to thank to you and all the contributors of pyscript for the great job. You sure know whats the best to put efforts on and shoudn't solve some isolated cased indeed. The latter may evolve on top of pyscript. The |
BetaWas this translation helpful?Give feedback.
All reactions
❤️ 1
-
it's all good ... my question was genuine though: what is it that your project is doing? The moment you use would you agree? anything I've written that is off or requires more personal investigation? |
BetaWas this translation helpful?Give feedback.
All reactions
👍 1
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.
-
Totally agree. I am not an profesional dev, and just trying to solve my case and share with the community if it may benefit. With sure i am not playing with WASM so you guess right. The project shoud work well on e-ink devices too, most of which are pretty weak. For comparison something takes 0.01s on iphone15 there it may take a minute. Pyodide for example loads for 10+ minutes if you are lucky to load at all. The data is from one page text up to full fledged novel (mb more or less). Thats why performance and caching is so paramount and on top of that to be as much hard for bots or automated systems to grab some data. This weekend will finish a version of persify in a way Offtopic maybe - please check the |
BetaWas this translation helpful?Give feedback.