Return-Path: Delivered-To: apmail-lucene-mahout-dev-archive@minotaur.apache.org Received: (qmail 95256 invoked from network); 8 Dec 2009 08:55:42 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 8 Dec 2009 08:55:42 -0000 Received: (qmail 24993 invoked by uid 500); 8 Dec 2009 08:55:41 -0000 Delivered-To: apmail-lucene-mahout-dev-archive@lucene.apache.org Received: (qmail 24934 invoked by uid 500); 8 Dec 2009 08:55:41 -0000 Mailing-List: contact mahout-dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mahout-dev@lucene.apache.org Delivered-To: mailing list mahout-dev@lucene.apache.org Received: (qmail 24731 invoked by uid 99); 8 Dec 2009 08:55:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2009 08:55:41 +0000 X-ASF-Spam-Status: No, hits=-10.5 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Dec 2009 08:55:39 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 15E59234C052 for ; Tue, 8 Dec 2009 00:55:18 -0800 (PST) Message-ID: <1096926718.1260262518073.JavaMail.jira@brutus> Date: Tue, 8 Dec 2009 08:55:18 +0000 (UTC) From: "Jeff Zhang (JIRA)" To: mahout-dev@lucene.apache.org Subject: [jira] Updated: (MAHOUT-213) storeMapping should not been called when toLongID() is called In-Reply-To: <1387906993.1260259098091.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/MAHOUT-213?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Jeff Zhang updated MAHOUT-213: ------------------------------ Status: Open (was: Patch Available) > storeMapping should not been called when toLongID() is called > ------------------------------------------------------------- > > Key: MAHOUT-213 > URL: https://issues.apache.org/jira/browse/MAHOUT-213 > Project: Mahout > Issue Type: Improvement > Components: Collaborative Filtering > Affects Versions: 0.4 > Reporter: Jeff Zhang > Fix For: 0.4 > > Attachments: Mahout_213.patch > > > In the trunk, storeMapping is called always when toLongID() is called. In my opinion storeMapping should been called only in method initialize(). > storeMapping will cost a lot when you use database to store the id mapping. I believe the code should like this: > {code} > public void initialize(Iterable stringIDs) throws TasteException { > for (String stringID : stringIDs) { > long longID = hash(stringID); > storeMapping(longID, stringID); > } > } > {code} -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.