automerge-classic icon indicating copy to clipboard operation
automerge-classic copied to clipboard

performance

Open mccoysc opened this issue 6 years ago • 6 comments

tested result:300 records/s on windows 10,intel Core i7 6650u,16GB RAM,microsoft surface pro 4.

i think it's too low.any improvement paln?

mccoysc avatar Nov 26 '18 06:11 mccoysc

test.zip

mccoysc avatar Nov 26 '18 06:11 mccoysc

performance for one CPU core

mccoysc avatar Nov 26 '18 06:11 mccoysc

the "automerge.js" function "change"'s code like this: const [newDoc, change] = Frontend.change(doc, message, callback); return newDoc; i suggest that the entire "[newDoc, change]" shold be return so that i have no need to handle change by another api and it's a way of performance improvements.

mccoysc avatar Nov 26 '18 06:11 mccoysc

if i remove the "getting changes" but using the return changes,the perfromance is up to 500 records /s

mccoysc avatar Nov 26 '18 06:11 mccoysc

Great to see some benchmarks! Thanks for taking the time to do them and post here. Performance is going to be pretty variable depending on the operations. Can you talk a bit more about your use-case and what kind of operations you expect to happen at a high rate?

pvh avatar Nov 26 '18 20:11 pvh

I also thought that using getChanges instead of simply using the returned changes is unnecessary and makes performance worse. Or am I wrong and there could be instances where Automerge.getChanges would return something different than the change in "const [newDoc, change] = Frontend.change(doc, message, callback);"? (Of course in the case of just one made change)

Valioesi avatar Feb 10 '19 16:02 Valioesi