mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
* Fasten up loading times by opening Babylon file only when indexing it.
This commit is contained in:
parent
1c2e28159c
commit
68c5c73b37
10
src/bgl.cc
10
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 ) )
|
||||
|
|
Loading…
Reference in a new issue