domingo, 20 de noviembre de 2011

Moving to Persistent

I haven't said much in a while, but of course, things are moving in the EclipseFP world. JPMoresmau announced the 2.20 release of EclipseFP, which in terms of interface gives you a way to manage your local installation of Cabal packages and a better outline of Cabal files. Internally, a lot has changed, as EclipseFP moved from using Scion as backend to BuildWrapper. This big change will hopefully solve most of the memory problems that EclipseFP was experiencing.

Also, I would like to announce that scion-browser is moving from a in-memory database to using SQLite to back up the data. In my tests performance is comparable to the old one (although for big tasks as browsing the entire list of local modules is a bit slower), but doesn't need a big pile of memory to hold the entire database, which I think it's a big win. If you're curious, you can browse the code, but be warned it doesn't work with the current version of EclipseFP.

The change has been possible thanks to the incredible Persistent package of Yesod fame. With that, I hadn't had to write a single line of code to create the database or to insert data. The only problem has been that Persistent doesn't have any way to encode queries with multiples joins. This lead me to write some of the queries by hand (and to refresh my ancient knowledge of SQL).

Hope you like it. As usual, every suggestion to improve EclipseFP or scion-browser is more than welcome :)

No hay comentarios:

Publicar un comentario