Code review comment for lp:~salgado/tomdroid/sync-ui

Revision history for this message
Olivier Bilodeau (plaxx) wrote :

Hi guys,

I'm a bit concerned when hearing about the XML vs JSON tags.. In the end, aren't they both strings (ex: system:template or system:notebook:bookname)? Wait, as I write this (noticing the <bookname> related to the notebook addin) I see tons of potential problems with a rigid SQL approach..

- A multi to multi SQL approach would be ugly as hell (one entry per <bookname>) but then what about nested xml in the tag or attributes in the xml node.. where would they end up?
- A list of enabled/disabled tags represented in a row of a note as a packed binary would not handle additional data either.. and would be more coupled with Tomdroid's version..

What do we do here? <buzzword>Schema-less database?</buzzword> I'll let you guys think about that. Do not hesitate to bring this to the -dev list if you feel it deserves to.

On the performance / potential power-saving topic:
Until we have benchmark evidence showing it's not efficient I would opt for simpler code and less db maintenance. I don't plan to do auto db upgrade for 0.4 but just drop the db because no notes can be created locally yet. Someone could work on that if required though.

However, related to your concern Guilherme, to improve things we should save and restore the list of notes from the main activity whenever we can in the lifecycle. This would improve a case or two where it is dropped. Actually I should write that down in doc/dev/TODO...

Thanks for the work guys!

« Back to merge proposal