Error   test

Archive for April 5th, 2007

DOCMan modules

Posted April 5, 2007 at 04:04am in Joomla, Programming

Midway through my work on the DOCMan portion of the FTA project I noticed that one page view in resources was 106 SQL queries, which is just way too many for one page. I tried to implement a caching solution that took the md5 of the query and stored the object in an array so I could save some resources. It did not work well with other components so I had to toss it out. By accident I found out that the problem was in the popular resources and latest resources modules. For each document listed it called the database to find out permissions and more detailed file information, which should be done in one query for all documents it will be showing. Since permissions don’t matter for these documents I just removed the lines calling the class function that was causing the problem. The end result is about 56-60 queries, which I still feel is a lot, but I can live with considering how many components we are using. I recommend you look at your setup if you are running either module.