SurveyJSON size reduction/optimization

SurveyJSON was storing a lot of redundant information (every setting on
every single section/question/answer, which, in most cases, will simply
take on the default values). This was bloating the surveyJSON property in
the db, and equally as importantly, slowing down Survey because it had to
do a lot of JSON parsing on the serialised surveyJSON object.

We now factor out and store the current section/question/answer defaults
along with the surveyJSON data itself, which means that we only needs to
store properties that differ from the defaults. This results is a massive
reduction in the size of the serialized surveyJSON stored in the database,
as well as a speed-up in json parsing time.

The compression/uncompression happens transparently to the rest of Survey.
This commit is contained in:
Patrick Donelan 2009-06-19 08:07:18 +00:00
parent d26ce5b447
commit cbc308c55a
4 changed files with 192 additions and 21 deletions

View file

@ -17,6 +17,7 @@
- fixed #10551: paypal (link to section of paypal website to enter in WebGUI information)
- fixed #10550: shipping plugins have no privileges
- fixed: Add progress bars for paste and edit branch.
- fixed: SurveyJSON database bloating
7.7.10
- Made a change to LDAP auth that adds an OR to that query so that it also searches for a row with fieldData REGEXP '^uid=(value-from-ldap-directory-server),'. (Wes Morgan)