vala

More on thumbnailing and optimization

Friday, July 9th, 2010 | Community, FOSS, vala | 4 Comments

Following my last post, spent most of the of the time on different imaging libraries to find a faster way of doing thumbnails and optimization.

I tested the following libraries to create image thumbnails, GdkPixbuf, imlib2, ImageMagic, epeg. Pixbuf gives somewhat nice timings , imlib2 is fast but was leaking too much memory. ImageMagic seems to the slowest among them. Last try was with epeg which can only handle jpegs and it came out as the fastest. So wrote a C function and using it from inside vala code using extern.

Next target was to find better way to get thumbnails from RAW images, tried libopenraw and LibRaw for that. But with help from yorba developers found the way to do it using gexiv2 only.

In between tried few tools for profiling the application, sayamindu told me about sysprof which seems to be the easiest for my purpose. Using it I found gexiv2_metadata_open_path is taking around 67% of time, inside it Exiv2::TiffImage:readMetaData is taking 51% of time.

Now coming to the point of speed , 1st run is on 1GB of RAW files

real	0m2.946s
user	0m2.542s
sys	0m0.116s

2nd run is on same 36GB of images , among them around half is RAW.

real	4m0.807s
user	0m54.283s
sys	1m24.789s

Now this is fast in my textbook :D I should not forget to tell about the great help I got from #vala and Adrien Bustany in the whole work.

Tags: , ,

Speed , Vala, Sqlite3 and optimization

Wednesday, July 7th, 2010 | FOSS, vala | 4 Comments

All started as just another stupid idea, writing an image indexer (reinventing the wheel ).  The code should do the following things:

  • Index images for any given folder with user provided tags
  • Extract and keep EXIF information from the files
  • Extract or generate image thumbnails for all files
  • Should be able to provide the thumbnail even if the original file is missing (may be in a usb hdd)
Wrote some test code to see how much time it takes to do the above for a folder with 36GB+ in size and 5044 images (both JPEG and NEF ) 

1st run 

real 30m39.178s
user 0m45.561s
sys 3m42.557s

2nd run with out thumbnail generation but with EXIF information

real 10m14.281s
user 0m58.208s
sys 0m45.969s

3rd run with out thumbnail generation and with out EXIF information

real 14m40.503s
user 0m1.585s
sys 0m7.535s

Here I am confused, managed to find out that transaction in sqlite can cause delay, so changed the code to do everything in single transaction
4th run with out thumbnail generation and with out EXIF information

real 0m1.032s
user 0m0.216s
sys 0m0.134s

5th run with out thumbnail generation but with EXIF information

real 3m1.191s
user 1m2.525s
sys 0m34.524s

6th run with everything 

real 16m47.241s
user 0m43.652s
sys 3m21.640s

So the major bottleneck is thumbnail generation, which I am currently doing Gdk.Pixbuf , for EXIF information I am using beautiful gexiv2 from awesome yorba guys.

Now to optimize I have to use some other library to generate thumbnails, which other libraries I can use ?

On the side note, I am not saving the thumbnails on disk but creating base64 encoded strings of them (I know I am bad, not following the thumbnail spec).

Tags: , ,

lekhonee-gnome 0.11 released

Thursday, June 24th, 2010 | Community, Fedora, FOSS | No Comments

I just released lekhonee-gnome 0.11, you can download the source from here, a yum repo for Fedora 13 can be found here.

Release Details:
  • Add new category button is re-enabled and it works :p
  • Updated translations
  • About dialog bug fixed

Tags: , ,

lekhonee-gnome 0.10 released

Thursday, June 3rd, 2010 | Fedora, FOSS, News | 1 Comment

lekhonee-gnome 0.10 is just released. You can download the source from here

This release comes with new translations for languages like Gujarati or Punjabi, also spell checking option is not anymore under right click menu ( something changed in webkit)
Here is an image of the right click menu used to look like.

Tags: , ,

lekhonee-gnome 0.9.1 is released

Thursday, April 29th, 2010 | Community, FOSS, News | 1 Comment

I am happy to announce the release of lekhonee-gnome 0.9.1 . You can download the source or check for koji builds for F12 or F13. New features are like:

  • Supports multiple WordPress accounts
  • Tabbed UI for different modes
  • Now supports adding <br> tag using tool button
  • Preview mode (more details on this below)
  • Advertisement message is disabled for this release
  • Stopped segfault(s) in couple of corner cases
  • Supports <video> and <audio> tags in Visual and preview mode (you may have to write the details in HTML mode)
  • Can watch youtube videos in Preview mode (not an actual feature :p )

So the main two new features are multiple account handling and Preview mode. In the preview mode you can see how the post will look like in your blog with the theme you are having. To fetch the blog style please click on the small download style/theme button in the toolbar (this button will only come in the toolbar if you don’t have cached theme downloaded in your system), though you need internet connection for this mode to work.

Tags: , , ,

New release of lekhonee-gnome

Tuesday, April 6th, 2010 | Community, FOSS | 6 Comments

I just released lekhonee-gnome ( desktop client for WordPress ) v0.9. You can download the source from here or look for the rpm F-12 or F-13

This is a complete rewrite of lekhonee-gnome in Vala. So, it is not anymore a gtk frondend to the previous python based one. 
Around 2 weeks back mether pointed me to Vala and I started porting lekhonee-gnome. The developers from IRC room #vala helped me a lot to learn and understand the basics of this new language and solving issues while I was working on it. Later siddesh , rakesh and paragn helped me to do the autoconf/autotool things fixed.
Changes/Features:
  • By default it will open WYSIWYG editor mode , people can still edit raw HTML by clicking the “Edit HTML” button in the right hand corner.
  • Added option for of extra HTML tags (HTML Tags menu) if one is editing HTML
  • Save/Open blog posts in the local computer in plain xml format , so that you can edit them in any editor
  • the configuration file is now a keyfile
  • In the WYSIWYG editor one can do Spell check by right clicking into  ”Spelling and Grammar” submenu
  • While editing HTML one can use Spell Check box
  • There is a progress bar in the statusbar area which will give visual feedback to the user whenever it will connect to server for any task
  • The “Add Category” button is disabled in this release, will come back in the next release :)

We need more testing and please file bug reports according to that. 

The post is brought to you by lekhonee-gnome v0.9

Tags: , ,

Search

Archives

Categories