It is for performance -- it used to allow any Comparable type but the object overhead slowed things down by 2-3x. It looks like you are using integer values already in Mongo, am I reading that right? those look like 12-byte hex values. Is it a question of reading/writing them as such then rather than treating as strings in Mongo? If you really have to convert such a thing to/from String, I bet that writing your own simple encoder/decoder runs much faster.
On Wed, Jun 1, 2011 at 3:50 AM, Mike Khristo <[email protected]> wrote: > Rather, how can I use string-based userid/itemid's without having the deal > with the slowness associated with mapping them to a long? > > In the MongoDataModel, for example, significant time/overhead goes into > converting the unique id's to long... I'm still getting my head wrapped > around mahout, but this seems like a significant limitation. I have to > assume there's some logic behind the decision to restrict them to long, but > i didn't find anything about it in Mahout in Action or the list. > > Thanks. >
