SQLite Forum

Efficiency of updates versus replace when using the JSON1 extension functions.
Thank you for the thorough explanation. I think I understand.

I thought it might be clear that one method would be quicker than the other, as it is for an indexedDB `put` operation on the entire string versus a `get/put` combination for an update; but I guess it isn't unless both methods are tested on the type of data the application will use.

At first, it would appear that the parsing, fiddling, and recomposing would consume a considerable portion of the total time required to complete the process, such that passing a complete string to replace the existing one would be quicker. But these steps take place in C and have to be compared to that which takes in the browser of stringifying a larger object from RAM and passing it via the native-messaging API to the C application.

I don't know enough about how the browser accomplishes these between C/C++ and JS.

My guess is replacing the entire string would be quicker, but my guess isn't worth much and the testing will be interesting.

Thanks again.