From 68c5c73b3738b2af596fadeebbcb4e027748bbf5 Mon Sep 17 00:00:00 2001 From: Konstantin Isakov Date: Tue, 14 Apr 2009 13:25:16 +0000 Subject: [PATCH] * Fasten up loading times by opening Babylon file only when indexing it. --- src/bgl.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/bgl.cc b/src/bgl.cc index f6344295..8d0c838a 100644 --- a/src/bgl.cc +++ b/src/bgl.cc @@ -645,11 +645,6 @@ vector< sptr< Dictionary::Class > > makeDictionaries( strcasecmp( i->c_str() + ( i->size() - 4 ), ".bgl" ) != 0 ) continue; - Babylon b( *i ); - - if ( !b.open() ) - continue; - // Got the file -- check if we need to rebuid the index vector< string > dictFiles( 1, *i ); @@ -663,6 +658,11 @@ vector< sptr< Dictionary::Class > > makeDictionaries( { // Building the index + Babylon b( *i ); + + if ( !b.open() ) + continue; + std::string sourceCharset, targetCharset; if ( !b.read( sourceCharset, targetCharset ) )