speed Syndicate content

warning: Creating default object from empty value in /www/htdocs/w0065fc9/milianw/modules/taxonomy/taxonomy.pages.inc on line 33.

» Profiling Rocks - KDevelop CMake Support now 20x faster

Wed, 03/31/2010 - 01:24

I just need to get this out quickly:

We were aware that KDevelop’s CMake support was slow. Too slow actually. It was profiled months ago and after a quick look that turned up QRegExp, it was discarded in fear of having to rewrite the whole parser properly, without using QRegExp. Which btw. is still a good idea of course.

But well, today I felt like I should do some more tinkering. I mean I managed to optimize KDevelop’s Cpp support recently (parsing Boost’s huge generated template headers, like e.g. vector200.hpp is now 30% faster). I managed to make KGraphViewer usable for huge callgraphs I produce in Massif Visualizer. So how hard could it be to make KDevelop’s CMake at least /a bit/ faster, he?

Yeah well an hour later and two commits later, I managed to find and fix two bottlenecks. Both where related to QRegExp. Neither was the actual parser, instead it was the part that evaluated CMake files, esp. the STRING(...) function. So even if we’d used a proper parser generator, this would still been slow.

The first one was the typical “don’t reinvent the wheel” kinda commit which already made the CMake support two times faster for projects that used FindQt4.cmake, i.e. any Qt or KDE project. Not bad, right? Well, while I fixed that I saw that KDevelop tried to do some Regular expression replacement on the output of qmake --help, this could not been right, could it? With help of Andreas and Aleix we found the bug in the parser and that made the CMake support 10 times faster.

So yeah, CMake projects using Qt or KDE should now get opened a whopping 20 times faster in KDevelop :)

I really love KCacheGrind and Valgrind’s callgrind - again it proved to be the most awesome tool one can imagine! If you are interested in the callgrind files:

  1. without optimization
  2. first optimization
  3. second optimization

Note: with KCacheGrind from trunk you can open these compressed files transparently :)

» profile.class.php

Tue, 06/24/2008 - 18:29

Every now and then I want to profile a given part of PHP code. For example I want to quickly check wether my current changeset to GeSHi works faster or is horribly slower. For a big change I’ll stick to Xdebug and KCachegrind. But for a quick overview? Overkill in my eyes.

Say hello to profile.class.php, a simple timer class for PHP5 which you can use to get an overview about where how much time is spent. This is in no way a scientific method nor should you take the results of a single run as a basis for you decisions.

I’ve set an emphasize on an easy API so you don’t have to pollute your code with arbitrary hoops and whistles.

UPDATE: You can find the current updated source in the SVN repo of GeSHi.

» Opera 9.50 beta

Tue, 09/04/2007 - 15:43

Opera released their first 9.5 Alpha today, nicknamed Kestrel. Usually I don’t use Opera, I use Firefox for webdevelopment with Firebug and similar tools but it’s pretty slow even on my fast new machine. For my everyday browsing I use Konqueror for it’s neat desktop integration (read ASpell, KWallet, Kio, Filebrowser etc.). And compared to Firefox Konqueror is fast.

But Opera… Well I knew it was fast but in their release note they mentioned even more speed improvements, also for ECMA Script (JavaScript). So I thought, lets give it a try and I have to say I’m pretty much flabbergasted. It feals like it’s more than double as fast as Konqueror! I really might start to use Opera more frequently now… Let’s see what else they got except speed!

Also very interesting is this part of the release note:

Platform integration

We worked to make Kestrel feel even more integrated with your platform. Mac users can expect a nice new visual look and feel, while Opera for Linux will add a QT4 build, so you can easily adjust your skin to match the desktop. 64-bit Linux/FreeBSD packages will also be available.

Neat! I’m really looking foreward to this since I prefer programs which adapt to the widget styles I use and see in other (KDE/Qt) programs.

Downside

Even in my first few minutes of usage I encountered a few problems, most notably some layout quirks with form elements which resolve after a refresh of the page.

via OSNews