4.dev.15 ruleset db is not a proper db?
First off, thank you for resolving https://trac.torproject.org/projects/tor/ticket/10174
However, the implementation looks wrong. The database does not appear to be made the way an SQL db is supposed to be made. There could be a reason that'd warrant an exception, so I'm mostly just asking for a clarification as to why this odd choice was made, not complaining that the db is bad.
The db contains a column "id" to link domains and a column "contents", which simply contains the lines of XML. You've essentially replaced the text file that contains lines of XML by a db that contains lines of XML.
Normally speaking, the db should have a column for each of the properties of a rule.
This allows for lazy loading of the ruleset, so the problem was solved on the filesystem level, but it was not solved on the per-rule level since it's still just XML that needs to be parsed. And now, you have a database that violates database design rules. Using the db to the fullest by transforming the XML rules into db columns would further improve the system.
So why was the choice made to do it this way? Cheers
Trac:
Username: Faziri