* Fasten up loading times by opening Babylon file only when indexing it.

This commit is contained in:
Konstantin Isakov 2009-04-14 13:25:16 +00:00
parent 1c2e28159c
commit 68c5c73b37

View file

@ -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 ) )