Vertimus 1.0

by Stéphane

22 03 2008

GNOME translation teams,
Vertimus is the perfect tool to follow each translation, translate, proofread and enhance the quality of contributions.

https://launchpad.net/vertimus

===================================
Overview of changes in Vertimus 1.0
===================================
tab: vertimus-1-0 (2008-03-21)

* XHTML and CSS pass the W3C validator
* New tool to download all PO files of a release
* Show informations about other modules with the same name in the
module page (Javascript)
* Move old files in a backup directory
* Add some maintenance scripts
* Display the authorized extensions in module page
* Add a search tool
* Reduce require_once calls
* Add informations about APC installation
* FIX Backup of files
* FIX No error message when the extension file isn’t valid
* FIX Web site title translation
* FIX call to date_default_timezone_set
* Fix #189903 - RSS feed error

New and last release wrote in PHP! Take it while it’s hot! The next version will be in Python to integrate features from Damned-lies and Transifex.



Waf build system

by Stéphane

17 03 2008

I integrate the Waf build system to libmodbus. Waf is a really nice project I hope Thomas Nagy will have time to update his documentation. The code is small and really easy to browse but the most impressive difference is the execution time:

time (./autogen.sh && ./configure && make && sudo make install)
=> 21.576s (with AM_DISABLE_STATIC)

time (./waf configure && ./waf build && sudo ./waf install)
=> 2.779s

The output is nice (compact and colorful), you can also use Waf in daemon mode (works with inotify) and each time a file of your project is modified, Waf build the new component. The size of the configure script is ~700Kb and if you choose to embed Waf it’s only 100Kb. Last but not least, your build system doesn’t check for Fortran anymore :).

Thanks to Ali Sabil for his demonstration of Waf at FOSDEM!



New features in Wisss : authentication, acl, blocks

by alf

11 03 2008

Following my last post about authentication, I’ve implemented it in Wisss. I’ve also added a simple ACL management which retrieves all resources, roles and privileges from database and constructs a Zend_Acl object in the boostrap. I’m not very happy to have to retrieve all stuffs about ACL each time, but for now, I have no time to implement something smarter.

To manage ACL, I’ve also begun to generate an admin interface which is also for now quite simple (displaying a big table with all roles and resources). Concerning resources, I’ve define three layers : module, screen, action. I don’t know yet what is the best practice to apply ACL to a particular object. I will think of it during next weeks.

I’ve also added a block view helper which displays blocks in the layout if you are allowed to. A block is just a screen rendered as a menu, what minimize concepts in the model. There’s also a special block : the context. Thanks to a context action helper, each action can register contextual action which will then appear in the context menu. For instance, the “create” action will be able to set “edit” and “delete” action as contextual actions.

I’m busy this week, and I was this last two weeks (giving a ZF formation ;-) ) but I will switch form generation to Zend_Form as soon as possible. Despite my first opinion, which was against the use of Zend_Form, I find this component very useful and productive. Even if it’s bad to put view logic in the controller, it seems to be far easier to maintain.

I think the 0.3.0 release will happen soon including everything to build a blog example (and many other application). 0.4.0 will focus on cleaning up the code, polishing the interface, trying to improve ACL. I hope there won’t be a 0.5 :-)



Performance of a PHP application with APC

by Stéphane

9 03 2008

To evaluate the performance of Vertimus with a opcode cache like APC, I used xdebug and Kcachegrind.
The results are really interesting, without APC, the index page has a total time cost of 191 032, the Zend Framework requires to use many classes, PHP is not really fast to parse and execute this code :

Vertimus without APC

and with APC, the total time cost is only 123 904:
Vertimus with APC

The CPU load is reduced by 36% but you need a bit of memory to store cache data (30 Mo by default). The results has been obtained with APC 3.0.16 and the following configuration:

;;;;;;;;;;;;;;;;;;
; APC ;
;;;;;;;;;;;;;;;;;;
extension=apc.so
apc.enabled=1
apc.shm_segments=1
apc.shm_size=30
apc.ttl=7200
apc.user_ttl=7200



Cairo-Clock is now really faster!

by Stéphane

3 03 2008

capture-cairo-clock-par-macslow.pngCairo-Clock is CPU intensive and consume around 13 % of CPU on my Core 2 Duo (on one CPU), the workload is spread on Xorg (10 %), compiz.real (2 %) and cairo-clock (1 %) with a smoothing value defined at 30 (default). The second hand drawing is disabled (default).

I wrote some patches to reduce the CPU consumption and now, Cairo-Clock doesn’t appear in ‘top’ list, woooh! The solution was simple, it useless to refresh the clock at 30 Hz if the second hand is not drawn. I also use common code to manage timeout and g_timeadd_seconds reduce the number of interrupts when many applications use this function.

I prefer bzr to git but I published my patches on github so MacSlow can take my patches here: http://github.com/stephane/cairo-clock/tree/master

PS: I couldn’t resist to translate in French (and fix Cairo-Clock for translation).