Lets say we allow pollfields on our forum topics. Now every time someone creates a forum topic, pollfield writes a record to the database containing mostly blank or default value fields. It should not be writing anything to the database unless the pollfield form has a question filled in at least.

Comments

mr.j’s picture

I should have added that records are written to {pollfield} and {content_field_poll} - the 2nd would vary depending on your CCK setup.

bryan kennedy’s picture

Component:Code» Performance

Assigning this to performance to help organize the issue queue. Glad you spelled this out mr.j

bryan kennedy’s picture

Title:Writes unnecessary records to database» Writes unnecessary and empty records to database
Issue tags:+database, +Perfomance

Clarifying the title a bit. The main issue here is that the pollfield code should check to see if there is any user input before doing ANY database calls. Right now it's writing empty fields or fields with " ".

I've made a bit of progress on eliminating some of these situations but haven't fully fixed it. This issue is related to some of problem here [1168408].

giorgio79’s picture