b2evolution Further Performance Tuning
I have upgraded my blog from b2evolution 3.x to 5.0.7. I have experienced a lot of performance issues. I did some performance tuning. Maybe they are useful for you. Firstly, I cleaned all unpublished comments. That makes the database much smaller and faster to run. Moreover, I went to System->General, and unchecked Log hits for every public page. That save the execution time for each page. Then I deleted all hit logs in database. For the same reason, I wish the database to be smaller. These information is not very useful. I have other analytically software to track the visitor count. I wish those tips can help you have a better b2evolution.
Dynamically Create an instance of class in code
In C#, you can create an instance of class dynamically. For example, you can create an instance of class according to database values, rather than hard coded.
You just need to use reflection.
Code
ObjectHandle obj = Activator.CreateInstance(AssemblyName,className); | |
Controller = (IApp) obj.Unwrap(); |
Please note that, Assembly Name is without ".dll", such as "AdvgenContact.App.WPF", and the class name need to be full qualified, for example, "AdvgenContact.App.WPF.MainApp".
If you wish to know more, please check out our open source project, AdvgenContact.
b2evolution.Widget Cache
I just upgraded my blog to b2evolution.5.0.7. I found it ate a lot of memory. The workaround is enable all levels of caching. Moreover, please do not forget to enable widget cache. The widget ate a ton of memory!
Leap Motion in Dick smith
A few days ago, I found a device calls "Leap Motion" which is a 3D motion and gestures controls. That is a kind of "3D" Mouse. For example, you can move your hand in the middle air to control a block in the screen left and right, up and down. That is very similar what Tom Cruise did in Minority Report. I listened a lot of report from some online gadget shows about this.
Now, you can find it in a local disk smith store for $129.98, but that is a quite expensive. $129.98 for doing some 3D gestures to my computer is a bit too much for me.
Gantry's CSS LESS compiler Error
I just got a new website built which is a Gantry template. I got some error, e.g. Fatal error: Out of memory. That is from Gantry's CSS LESS compiler. I tried to comment out the codes to by-pass compiler. It does not 100% work. Finally, I put a request to web host for increasing the buffer to 128MB. Then all works fine.
(Note that, I know you can use define function in php to increase your memory buffer, but some web hosts will not allow it.)

