Skip to content

Commit

Permalink
don't cache the data for iterations in memory
Browse files Browse the repository at this point in the history
  • Loading branch information
technoweenie committed Dec 3, 2011
1 parent 4e6fd35 commit 232d010
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ext/leveldb/leveldb.cc
Expand Up @@ -145,7 +145,9 @@ static VALUE db_size(VALUE self) {
static VALUE db_iterate(VALUE self, VALUE key_from, VALUE key_to, bool reversed) {
bound_db* db;
Data_Get_Struct(self, bound_db, db);
leveldb::Iterator* it = db->db->NewIterator(leveldb::ReadOptions());
leveldb::ReadOptions readOptions;
readOptions.fill_cache = false;
leveldb::Iterator* it = db->db->NewIterator(readOptions);
ID to_s = rb_intern("to_s");

if(RTEST(key_from)) {
Expand Down

0 comments on commit 232d010

Please sign in to comment.