aboutsummaryrefslogtreecommitdiff
path: root/ext/wasm/api/sqlite3-opfs-async-proxy.js
Commit message (Collapse)AuthorAge
* Approximately 100 typo corrections spanning the whole tree, submitted via ↵stephan2025-02-27
| | | | | [forum:0db9827f0464bc33|forum post 0db9827f0464bc33] and individually audited and verified. Affects only code comments, innocuous test strings, error message text in tool (not library) code, and configure-level help text. FossilOrigin-Name: f50c21484d3cac73589da0376c423de39ae8b842218105786c5aa3726e4dcaed
* Ensure that the OPFS VFS's xOpen() writes back the read-only flag to the ↵stephan2024-10-17
| | | | | output flags. Resolves the problem reported in [forum:cf37d5ff1182c31081 | forum post cf37d5ff1182c31081]. FossilOrigin-Name: 0a32624015f16fd881a4ecbb56b7833391028d327a95f4c899eee864ed7fe00d
* Remove the timing and counter metrics from the OPFS VFS, as they're ↵stephan2024-07-11
| | | | | long-since unused so are just wasted CPU cycles. FossilOrigin-Name: 67c035c34fb916e66bfe115a132660771e8fa2921e6d46756975c5df3ebcd73c
* Remove some dead JS code. Improve the exception-to-C-result-code conversion ↵stephan2024-06-12
| | | | | to account for the case of a file disappearing while the OPFS VFS is waiting to acquire a lock on it. FossilOrigin-Name: 5bd9fd5f61e7cd1ed3b44c5cabc759c154c98eb40ad10d29e61f142aaa062ddf
* Doc updates in JS code. No functional changes.stephan2024-06-12
| | | FossilOrigin-Name: 587ed3a5d283898ad0e67ccee86a0a4ccc432fa292c0a3534e9e6ec70a7b7780
* JS: remove an unused function argument and some debug-related comments. No ↵stephan2024-03-14
| | | | | functional changes. FossilOrigin-Name: f15709430d4ba2fcf5729bc30a45dacb77102927b82cda12de0b67935b526cc0
* Add delete-before-open=1 URI flag to the 'opfs' VFS to tell it to xDelete ↵stephan2024-03-11
| | | | | the db file before opening it, primarily to enable users to work around a corrupt db without having to reach into OPFS-specific APIs to remove the db file. FossilOrigin-Name: e83f9788636f7f9bcca7d2a09620c13ab4eb83436d5b2946a827e48addf0267d
* Micro-optimizations in opfs-sahpool.stephan2023-07-16
| | | FossilOrigin-Name: 52f23db948ae9694df69c00177b85cb569e9b211350a4a2dbf249e7cd8de700c
* Minor tweak to the OPFS async proxy to attempt to account for a spurious ↵stephan2023-05-30
| | | | | high-load console error message which was reported via the sqlite-wasm npm project. FossilOrigin-Name: a61467d1fbb7a2804bfdc685a38e0b738747b9afd42c25a78a938b114a822f61
* Replace use of 'self' in JS code with 'globalThis', as that works in ↵stephan2023-03-07
| | | | | browsers and node environments. Avoid using globalThis.location if it's not set (e.g. in node). Based on feedback in [forum:ac7a94d4f77db235|forum post ac7a94d4f77db235]. Minor JS build tweaks. FossilOrigin-Name: dbbe8f25e58738c10b6192d41f1e3886983871f17631cbc45ce626d3f05a6e26
* Roll back part of [c54f29d8] which attempted to use symbols which that ↵stephan2023-02-06
| | | | | worker does not have access to. FossilOrigin-Name: 90b12211376eb445df7221b3d3593394ff651ef93f4218492c6208bc74b8fc63
* Add capability to override the JS's use of console.log/debug/warn/error() ↵stephan2023-02-06
| | | | | with client-provided versions via the bootstrap-time config object. FossilOrigin-Name: c54f29d8e55419eaa9168e799dab5030e89063b13d8390a50616606422d164dc
* Remove some dead JS code and tweak some docs.stephan2022-12-08
| | | FossilOrigin-Name: 0ee495452c014680697aa9035c245024df127a52d1820ab0e02580a015d96ecb
* Minor internal tweaks to the OPFS VFS. Resolve a missing result code which ↵stephan2022-12-02
| | | | | lead to a null deref in xFileSize(). FossilOrigin-Name: 57dd593ef0efa17dfb3a9f4eac36d5b8b879e271de817d8cd94a8c8b56d31870
* OPFS VFS: translate createSyncAccessHandle() exceptions which appear to be ↵stephan2022-12-02
| | | | | locking violations to SQLITE_BUSY. This seems to improve concurrency considerably even with a reduced retry count of 5 (was 6). FossilOrigin-Name: 0d36021d107d3afca190ad61c3380536ad0cc2d493d345d48f9f9c1191741128
* Simplify how the OPFS VFS async proxy copies initial state sent to it from ↵stephan2022-11-30
| | | | | the synchronous side of the connection. Make the lock-wait time a multiple of the wait-loop timeout interval. FossilOrigin-Name: eddafafffa634a42ceeed70aa3fc58be130527612157a4bf4ff9e65c7f6dc26c
* Rename some OPFS JS files. Prevent JS bindings of sqlite3_uri_...() from ↵stephan2022-11-30
| | | | | performing JS-to-C-string argument conversion on their first argument, as doing so is specifically illegal. FossilOrigin-Name: 79832808de2cbdba140ed9e0558f1502b51d131ab4315265315922cda7b748cb
* Doc and logging text tweaks in the OPFS async proxy and test app.stephan2022-11-30
| | | FossilOrigin-Name: 7ce8608e221924d2c7067687eb6eef0f3cab181d5b4132e55a67d8514b6ce94b
* Minor internal cleanups and docs in the OPFS sqlite3_vfs.stephan2022-11-29
| | | FossilOrigin-Name: 61799b05ff232c2ac349169c27bfe7f8d9277366093b0c9dd2739828993b3066
* Internal restructuring of the OPFS sqlite3_vfs in order to facilitate ↵stephan2022-11-29
| | | | | certain experimentation and improve error reporting/hints if it cannot be activated. Deprecate the name sqlite3.opfs.OpfsDb, preferring sqlite3.oo1.OpfsDb for consistency with JsStorageDb and any future DB subclasses. FossilOrigin-Name: 0c5c51f4fb04a4b90c50ec9704cfea9a3fb7d7d0ee55c1b0d4476129188217a6
* Document an OPFS API change in Chrome v108 which does not break our code but ↵stephan2022-11-27
| | | | | does change several formerly async methods to synchronous. No code changes. FossilOrigin-Name: e9dd87e28a96eb6560943b9a2cb3cb0ff14698c96fe63865944dcfed73b67bd3
* More work on the OPFS concurrency testing app.stephan2022-11-24
| | | FossilOrigin-Name: c0458caca3508d5d252f9b5198bda4f51a5c1874540f014b17e409f2daab1706
* Add an experimental OPFS VFS-specific URI flag, opfs-unlock-asap, which ↵stephan2022-11-23
| | | | | tells the VFS to release implicit locks ASAP. This permits higher concurrency but hurts performance considerably. This may or may not be obsoleted by other concurrency-related experimentation. FossilOrigin-Name: d23c917013485ec2793125221f3936b05c39d6eca941629fb819b6b4aa714520
* Initial infrastructure for adding a mode to the OPFS VFS which causes ↵stephan2022-11-23
| | | | | implicit locks to be released ASAP, which increases concurrency at the cost of performance. FossilOrigin-Name: c5b7a9715a13b696ab3ee965aa0a310f59b65f07cecd72faa2e3504bfd8eb632
* More tweaking of OPFS concurrency measures and the related test app.stephan2022-11-21
| | | FossilOrigin-Name: a8d4da1501d411085ec2fd48c4a056c8b1d97ef3c3203c5b403a854ac2864870
* Resolve missing SQLITE_LOCKED result code which triggered a new (since last ↵stephan2022-11-21
| | | | | checkin) exception in the OPFS VFS. Improve output of the OPFS contention tester app. FossilOrigin-Name: 2debbbca33bd4170a1dc4dbb5eb3e68523e51d289b06c551e5560ac4e32e433b
* Add test app for experimenting with multi-worker OPFS concurrency. Tweak ↵stephan2022-11-21
| | | | | OPFS VFS to significantly improve the otherwise "unfortunate" concurrency situation. FossilOrigin-Name: 96f76e7616f8157a342b9e1c42f7b1feab200d182268871a2b25f67d4ee2564c
* Rework automatically acquired OPFS locks to be released during idle time. ↵stephan2022-11-10
| | | | | This eliminates the performance hit reported in [46304ba057707c]. FossilOrigin-Name: a7fe91afca473fe55c983bc81d214df4ef3699863c7423fa4b6b9cde23d6a3b4
* OPFS: if an op which needs a lock is called when no lock has been obtained, ↵stephan2022-11-10
| | | | | automatically lock it at the start of the op and unlock it at the end of that op. This is an attempt to alleviate the cross-tab contention described in [forum post 58a377083cd24a|forum:58a377083cd24a] but it increases speedtest1 run time by approximately 4x. Perhaps auto-lock can be combined with the older idle-time-based auto-unlock to unlock such locks (but not those from xLock()) to improve this? FossilOrigin-Name: 46304ba057707c3b072b6e7bb8c4af774f653aa5814099f0866cd87b2b73abeb
* Globally replace '' with "" for empty JS strings to please C preprocessor.stephan2022-11-03
| | | FossilOrigin-Name: e92e1f42bef94a1df29f66b4111ebfde93eba3759bc5d5a9c95f714508851346
* Add sqlite3_wasm_vfs_create_file() to replace Emscripten's ↵stephan2022-11-02
| | | | | FS.createDataFile() in a (mostly) VFS-agnostic way. Add a test for worker1's export (to bytearray) support. Re-add worker1 open-from-bytearray using sqlite3_wasm_vfs_create_file() but it's untested (requires a new interactive test app or maybe reconsideration). FossilOrigin-Name: b35e1225c91a3cadc0d25af1e4e790237256d194990faa13190e343ed03e11c5
* Fix a symbol name typo which broke and exception-handling case in OPFS xOpen().stephan2022-11-02
| | | FossilOrigin-Name: 5bc83d569594e104e90b1acef1a5fd23655b2089de393a6776e799fdef2082f5
* Significant cleanups and expansion of the sqlite3.opfs utilities. Add ↵stephan2022-11-01
| | | | | oo1.DB.dbVfsName(). Add VFS name to worker1:open's arguments and result. FossilOrigin-Name: 86a341d7e061f946b39e8647ddd4743013b851b33ae9e6e755d8dbc53fba5286
* Internal tweaks to the OPFS VFS result codes.stephan2022-10-31
| | | FossilOrigin-Name: 32e1a2d2eb8738ae1635e413829f6cf7f64c63d2a86b72940a573de89948e529
* Adjust automatic OPFS locking retries such that they will wait up to a total ↵stephan2022-10-30
| | | | | of 3 seconds spanning 4 attempts. FossilOrigin-Name: bbce49d81abc491ca666474040a53057e26e99131fea9449de253f88f4415ded
* Minor cleanups and doc improvements in the OPFS sqlite3_vfs proxy.stephan2022-10-25
| | | FossilOrigin-Name: 48645f7bcacf81c4149f26d20ee1752fbe93a02f96b85bd7e28bfa49322137e5
* Apply considerable acrobatics to get the JS/WASM deliverables building to ↵stephan2022-10-19
and loadable from a directory other than the one which contains the app-level code. Requires an only-slightly-leaky abstraction of passing a URL argument when loading sqlite3.js but provides much greater flexibility in where the JS/WASM files are located. FossilOrigin-Name: 6d468dab9eb84d4548f68014959f02fe4f66455472ff24fe729382bb2972e3d1