Kouhei Sutou 2019-04-05 16:06:04 +0900 (Fri, 05 Apr 2019) Revision: 0e3656b033136ce15c7cdabe798c3c556345e678 https://github.com/groonga/groonga/commit/0e3656b033136ce15c7cdabe798c3c556345e678 Message: ii: fix too much space for INDEX_LARGE 4x is too much. 2x is max. Modified files: doc/locale/ja/LC_MESSAGES/reference.po doc/source/reference/commands/column_create.rst lib/grn_ii.h lib/ii.c Modified: doc/locale/ja/LC_MESSAGES/reference.po (+3 -3) =================================================================== --- doc/locale/ja/LC_MESSAGES/reference.po 2019-04-05 16:41:05 +0900 (1d0ce6276) +++ doc/locale/ja/LC_MESSAGES/reference.po 2019-04-05 16:06:04 +0900 (ad76f6f13) @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: 1.2.1\n" "Report-Msgid-Bugs-To: \n" -"PO-Revision-Date: 2019-04-05 14:48+0900\n" +"PO-Revision-Date: 2019-04-05 16:04+0900\n" "Last-Translator: Masafumi Yokoyama <yokoy****@clear*****>\n" "Language-Team: Japanese\n" "Language: ja\n" @@ -5216,12 +5216,12 @@ msgstr "大きなインデックスカラムを作成" msgid "" "If you know index target data are large, you need to use large index column. " "It uses increases memory usage for the index column but it can accept more " -"data. Memory usage is 4 times larger than the default index column." +"data. Memory usage is 2 times larger than the default index column." msgstr "" "もし、インデックス対象のデータが大きいことがわかっているなら大きなインデック" "スカラムを使わなければいけません。このインデックスカラムが使用するメモリー量" "が増えますが、より多くのデータを扱えます。デフォルトのインデックスカラムと比" -"べて4倍のメモリー使用量になります。" +"べて2倍のメモリー使用量になります。" msgid "How many data are large? It depends on data." msgstr "どのくらいのデータが大きなデータでしょうか。それはデータによります。" Modified: doc/source/reference/commands/column_create.rst (+1 -1) =================================================================== --- doc/source/reference/commands/column_create.rst 2019-04-05 16:41:05 +0900 (8c03f88b8) +++ doc/source/reference/commands/column_create.rst 2019-04-05 16:06:04 +0900 (91e38546f) @@ -569,7 +569,7 @@ Create a large index column If you know index target data are large, you need to use large index column. It uses increases memory usage for the index column but it can -accept more data. Memory usage is 4 times larger than the default +accept more data. Memory usage is 2 times larger than the default index column. How many data are large? It depends on data. Modified: lib/grn_ii.h (+1 -1) =================================================================== --- lib/grn_ii.h 2019-04-05 16:41:05 +0900 (9e69d39c3) +++ lib/grn_ii.h 2019-04-05 16:06:04 +0900 (7a49df55d) @@ -54,7 +54,7 @@ struct _grn_ii { /* BGQ is buffer garbage queue? */ #define GRN_II_BGQSIZE 16 #define GRN_II_MAX_LSEG 0x10000 -#define GRN_II_MAX_LSEG_EXTEND 0x30000 +#define GRN_II_MAX_LSEG_EXTEND 0x10000 #define GRN_II_W_TOTAL_CHUNK 40 #define GRN_II_W_CHUNK 22 #define GRN_II_W_LEAST_CHUNK (GRN_II_W_TOTAL_CHUNK - 32) Modified: lib/ii.c (+3 -3) =================================================================== --- lib/ii.c 2019-04-05 16:41:05 +0900 (249cb100c) +++ lib/ii.c 2019-04-05 16:06:04 +0900 (4893a78cb) @@ -2335,7 +2335,7 @@ grn_inline static uint32_t grn_ii_pos_lseg(grn_ii *ii, uint32_t pos) { if (ii->header.common->flags & GRN_OBJ_INDEX_LARGE) { - return pos >> 18; + return pos >> 17; } else { return pos >> 16; } @@ -2345,7 +2345,7 @@ grn_inline static uint32_t grn_ii_pos_loffset(grn_ii *ii, uint32_t pos) { if (ii->header.common->flags & GRN_OBJ_INDEX_LARGE) { - return (pos & 0xffff) << 4; + return (pos & 0xffff) << 3; } else { return (pos & 0xffff) << 2; } @@ -2355,7 +2355,7 @@ grn_inline static uint32_t grn_ii_pos_pack(grn_ii *ii, uint32_t lseg, uint32_t loffset) { if (ii->header.common->flags & GRN_OBJ_INDEX_LARGE) { - return (lseg << 18) + (loffset >> 4); + return (lseg << 17) + (loffset >> 3); } else { return (lseg << 16) + (loffset >> 2); } -------------- next part -------------- An HTML attachment was scrubbed... URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190405/bcaa5517/attachment-0001.html>