Performance tuning, step 1

Last night I did some programming with the search function and function that shows you personal conversations. I built a config parameter where you can now switch between the old search mechanism (enabled by default) and the new one that is built upon the mysql fulltext engine.

In the picture below you can see the effect:


I enabled the switch last night.

Downside of this switch is that by default all search keywords must have 4 or more characters – but this can be configured in the mysql server. I do accept this downside for the benefit that it doesn’t kill my server anymore.

Additionally I added some negative caching in the config system. When you preload all configurations for one family (with load_config) – and there is none – then get_config wouldn’t do a database query anymore for any parameter of this family.

I will have a look at the slow queries log the next days and will see where I have to tweak the code to make the system more faster.