[Groonga-commit] groonga/groonga [master] enabled grn_pat_cache in grn_ii_build()

Back to archive index

null+****@clear***** null+****@clear*****
2012年 2月 8日 (水) 07:34:28 JST


Daijiro MORI	2012-02-08 07:34:28 +0900 (Wed, 08 Feb 2012)

  New Revision: 7c025689c95c19d51017a210386ab12bfb2223c0

  Log:
    enabled grn_pat_cache in grn_ii_build()

  Modified files:
    lib/ii.c

  Modified: lib/ii.c (+7 -1)
===================================================================
--- lib/ii.c    2012-02-08 07:24:02 +0900 (563643d)
+++ lib/ii.c    2012-02-08 07:34:28 +0900 (eebabb9)
@@ -6838,7 +6838,13 @@ grn_ii_build(grn_ctx *ctx, grn_ii *ii)
   builder.target = target;
   builder.lexicon = ii->lexicon;
   builder.tmp_lexicon = NULL;
-
+  {
+    grn_obj_flags flags;
+    grn_table_get_info(ctx, builder.lexicon, &flags, NULL, NULL);
+    if (flags & GRN_OBJ_TABLE_PAT_KEY) {
+      grn_pat_cache_enable(ctx, (grn_pat *)builder.lexicon, PAT_CACHE_SIZE);
+    }
+  }
   builder.nblocks = 0;
   builder.blocks = NULL;
 




Groonga-commit メーリングリストの案内
Back to archive index