En ce moment sur Jamendo : Ecoutez les jamradios !
juin
25
2006
0

Speeding up Prototype’s Selector

While working on the future AJAX interface of jamendo, I ran into some performance problems that were due to the extensive use of the new Prototype 1.5 function, $$. (Announcement of $$ on Ajaxian)

Prototype’s current code is quite elegant (as always!) but very slow, so I wrote an add-on that makes this function up to 20 times faster in most usual cases (tested on IE6, Firefox 1.5 and Opera). Don’t believe me, test it yourself!

Download the add-on | Stripped down version (1.3Kb) | Interactive test suite

UPDATE:
Thanks to StoneCypher from #prototype I ran the regression tests and fixed a trivial bug. Now the add-on passes the regression tests! Good :-)

Here are the main ideas of this add-on :

  • Forwarding the call to the old $$ if the selector expression is too complicated (currently : if it uses attributes)
  • Replacing regular expressions with a simple parser
  • Minimizing the number of operations done on each iteration.
  • Trying to use getDocumentById() instead of getDocumentByTagName() when possible.
  • Avoiding recursive functions with return values.
  • Not being afraid of some “old-style” code if it speeds up the execution ;-)

I just emailed the code to Sam Stephenson (the author of Prototype), I hope he’ll welcome the speedup! I don’t know if this add-on could make it into the Prototype SVN trunk, maybe some comments from Sam or from readers of this blog will help improve it.

To use this code in your website, just include the javascript file after prototype.js, and the $$ function will be automatically replaced. The old one will still be available as “$$old” (but you shouldn’t need it. The add-on is “feature-compatible” with the original)

This code is released under the same license as Prototype (”AS-IS” ?) so feel free to use it. (In this case, a comment about our exciting free music website jamendo would be appreciated too ;-)

That’s it ;-) I look forward to having your comments on this code, it’s open for discussion!

Written by sylvinus in: Uncategorized |
juin
15
2006
0

Presenting jamendo in Amsterdam…

Tomorrow I’ll drive from Grenoble to Amsterdam where I’m presenting jamendo at both the “Holland Open Conference” and the “Digital Pionners Academy”.

This is very exciting because it’s one of my first presentations of jamendo in front of an english-speaking audience. I’ll speak next to guys from Wikipedia, Creative Commons and OpenBusiness.cc so I guess it’s quite a good start ;-)

Here are my “final” slides for tomorrow : PDF

Wish me good luck for both the conference and the 10-hour drive ;-)

Written by sylvinus in: Uncategorized |
juin
14
2006
0

A post from Flock 0.7 "Cardinal”

With all the buzz on Flock I decided to give it a try!

My impressions are mixed. I think the default skin looks bad, it has a “toy” feel just like IE7.

I’m currently trying the “New blog post” feature, that’s a good one. I’ll install an extension like this in my beloved firefox (which is crying with my 50+ extensions)

There are also a few severe bugs in the main window, I don’t have time to report them though

PS: I had to publish this post twice to get it working! :-/

Written by sylvinus in: Uncategorized |
juin
13
2006
0

Dropping out of school…

Following the example of many talented people out there, I just dropped out of my school!

Okay, I don’t really feel like this will make me any more talented ;-) But it’s a great step, at least for jamendo :

From now on, I officially work full time on jamendo!

Wooooooooooooooooooooooowwww!!

I remember that when I imagined jamendo more than 2 years ago, I used to dream about this. I hoped that maybe, -someday- I could make a living of the project I was creating. Well, here we are!!!

The funny thing about this story is that I imagined jamendo at the very same time I was struggling to enter this “dream school” in CS & Mathematics (ENSIMAG, France). At this time it was hard for me to figure out which one (of the school or jamendo) was the backup plan ;-)

So once again, thanks to all the people that made this possible… Laurent, Pierre, Amélie, David, John, Alf, Aurélien, the 6 other “LesAutres.org” founders, and of course all our talented artists ;-)

To celebrate this new situation, I’m working on one of the biggest updates of jamendo so far, including our new API, a better homepage and a brand new design ;-) Stay tuned!

Written by sylvinus in: Uncategorized |
juin
03
2006
0

Jamendo: now with full Blog powers!

The latest weeks have been very exciting for Jamendo. We shipped several “Web 2.0″ (or whatever it will called now) upgrades of the website, the latest being Blog support.

I implemented both metaWeblog API and Atom API so that we can post everywhere. Currently I have some trouble with Blogger because they seem to be updating their backend. I’ll wait for them to calm down…

Anyway, you can now blog your reviews on the most common blogs out there (TypePad, WordPress, DotClear, LiveJournal, MovableType, Typo, etc…), the previous entry is the first test I made ;-)

I hope the community will use this feature heavily because I spent the last couple of days hacking…

I’m quite proud of the autodetection feature ;-) You just have to enter the URL of your blog homepage and Jamendo will detect its type and API address. Try it now !

Written by sylvinus in: Uncategorized |
juin
03
2006
0

Project 5 : God save the funk!

This is one of my favourite albums from Jamendo.

It has a sweet groove I really like. The pianist has some good spots all over the album.

Please send more music to jamendo! ;-)

Written by sylvinus in: Creative Commons, Jamendo, Music |

Reporter un abus
WordPress mu & Aeros Theme

Creative Commons Attribution-ShareAlike 2.0 France
Creative Commons Attribution-ShareAlike 2.0 France