So, to avoid multiple reads and writes, I use a buffer variable as an attribute of the storage, and update the buffer upon each call to the write method. Then, to commit changes, I have to call the close method that actually flushes all modifications to the data file. This resolves performance issue.
By the way, since I started using tinydb, and realized how customizable it is, I use it in various cases like handling csv, excel, json files as well as a substitute for sqlite that stores data in encrypted format ... .
I haven't noticed any performance issue, until once I throw a rather big excel file at it. But tinydb already has a workaround for that ?