Better Performance Needed / Blank pages
| Project: | DrupalIt |
| Version: | 5.x-1.4-beta2 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs review |
Hi,
if you install the devel module and have a look at the query times of drupalit you will find something like this (bold for time in ms):
219.99 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 17874 AND uid = 1
204.99 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 24559 AND uid = 1
204.11 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 24605 AND uid = 1
204 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 24572 AND uid = 1
203.7 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 24560 AND uid = 1
203.53 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 24536 AND uid = 1
203.48 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 24541 AND uid = 1
203.31 1 _drupalit_data SELECT * FROM drupalit_user_to_vote WHERE nid = 24546 AND uid = 1
This is an enormous amount, a performance killer!
Are there any ways to cache the querys on frontpage etc.? Or are there any ways in modifying the module (patch) to make it perform better?
Thank you very much!

#1
We finally had to get rid of this module.
It leads to blank index and taxonomy pages and slows down the performance of the site dramatically.
That was very very ugly....
#2
Changed this to bug report because it really is a bug.
#3
Just perform the following SQL in your MySQL console (e.g. phpMyAdmin):
ALTER TABLE `drupalit_user_to_vote` ADD INDEX ( `uid` , `nid` )
Should be part of install script...
#4
Thanks, but we had to uninstall the module.
#5
Here's a patch for this.
Please review and either change the status to "reviewed & tested" or to "code needs work" and let me know what problems you had.
Thank you.