Change of Meeting Date?

From the Mailing List:

I’ve mentioned this in the past and was wondering if anyone would be interested in changing the meeting dates.  I’m personally interested because our meetings also occur on the same day as the Dirty Rectangles fellows which I’ve been wanting to go to for a while now.

We could perhaps move it from the 3rd Wednesday to the 3rd Tuesday of the month or would people prefer something else?  These changes probably won’t happen for another month or two.

Please join in the conversation on the mailing list.

[IMPORTANT] Change of meeting Location for March

Begin copy-pasta from mailing list email.

 

Hey Everyone,

There’s been a scheduling mishap and all the rooms are booked at the Code Factory. I’ve gotten us some space at the Cock and Lion on Sparks St and we’ll have a projector so we can still enjoy the presentationy goodness.

The place is a bit of tricky to find if you don’t know what you’re looking for hopefully this google link will help you out :)

http://maps.google.ca/maps?client=safari&rls=en&q=Cock+and+Lion+ottawa&oe=UTF-8&redir_esc=&um=1&ie=UTF-8&hl=en&sa=N&tab=wl&authuser=0

Cheers

 

Android 9-Patch Blog

http://android9patch.blogspot.ca/

Android and Ubuntu on One Device?

I really do hope that we shall see a device with Ubuntu and Android that switches when docked. I know I would want one. Wouldn’t you?

http://www.ubuntu.com/devices/android

Guest Post: Lessons Learned from Bulk Parsing and Database Insertion

This article originates from christophersaunders.ca

I’m beginning to work on an STO application from an API that was created by Philippe Casgrain. The data was stored in a pretty big JSON file, and I decided that instead of breaking it into smaller pieces I would simply insert everything into an SQLite database. Previously the only time I had worked with Android databases had simply been via insertions with ContentValues, which is a lot slower than I had thought at first.

Previously this is what I was doing

void insertData(List objects, SQLiteDatabase db) { 
    ContentValues cvs = new ContentValues();
    for(Foo obj : objects){
        cvs.put("FooStringColumn", obj.fooString());
        cvs.put("FooIntegerColumn", obj.fooInteger()); 
        long result = db.insertWithOnConflict("Foo", null, cvs, SQLiteDatabase.CONFLICT_REPLACE);
    }
}

This works alright, though when you are generating thousands of entries from your JSON data it results in something that’s so slow it’s painful. At first I thought my problems were stemming from using the org.json tools included in Android so I switched over to using Google GSON instead, which did help reduce a ton of unnecessary garbage collection. Though, everything was still slow.

My database knowledge isn’t extremely deep, and I recall being able to compile PreparedStatements to speed up interaction with the DB. After a bit of searching on the internet I came across an alternative way of doing database insertion using this thing known as an InsertHelper. Using an InsertHelper is pretty straightforward, though it requires writing a bit more code than ContentValues, but it’s way faster.

void insertData(List objects, SQLiteDatabase db){
    InsertHelper helper = new InsertHelper(db, "Foo");
    final int fooStrCol = helper.getColumnIndex("FooStringColumn");
    final int fooIntCol = helper.getColumnIndex("FooIntegerColumn");
    for(Foo obj : objects){
        helper.prepareForInsert();
        helper.bind(fooStrCol, obj.fooString());
        helper.bind(fooIntCol, obj.fooInteger());
        helper.execute();
    }
}

To also help speed things up, I extracted all of my data first then inserted everything in a transaction. This helped reduce overhead and I was able to get the database initialized in about 10 seconds. Surely I can speed it up further, but for now this seems to solve my problems.

References