Abdelrazak Younes wrote: > But the initial calculation is very long if you set encoding to utf8 > (more than a minute).
Yes, this is a general problem. The iconv processes are very expensive if the whole unicode range is involved (especially on Windows, apparently; here, it "just" takes 30 seconds). > And switching from one category to another takes > 10 seconds each time ("Display all" is unchecked). Better with the attached? Jürgen
Index: src/frontends/qt4/GuiSymbols.h =================================================================== --- src/frontends/qt4/GuiSymbols.h (Revision 22859) +++ src/frontends/qt4/GuiSymbols.h (Arbeitskopie) @@ -16,6 +16,7 @@ #include "ui_SymbolsUi.h" #include <map> +#include <set> class QListWidgetItem; @@ -63,6 +64,10 @@ typedef std::map<QString, QListWidgetItem *> UsedBlocks; /// UsedBlocks used_blocks; + /// list of all symbols + typedef std::set<char_type> SymbolsList; + /// + SymbolsList symbols_; }; } // namespace frontend Index: src/frontends/qt4/GuiSymbols.cpp =================================================================== --- src/frontends/qt4/GuiSymbols.cpp (Revision 22860) +++ src/frontends/qt4/GuiSymbols.cpp (Arbeitskopie) @@ -287,9 +287,10 @@ } bool const show_all = categoryFilterCB->isChecked(); - typedef set<char_type> SymbolsList; - Encoding enc = *(encodings.getFromLyXName(encoding_)); - SymbolsList symbols = enc.getSymbolsList(); + if (symbols_.empty() || update_combo) { + Encoding enc = *(encodings.getFromLyXName(encoding_)); + symbols_ = enc.getSymbolsList(); + } if (!show_all) { for (int i = 0 ; i < no_blocks; ++i) @@ -300,8 +301,8 @@ } } - SymbolsList::const_iterator const end = symbols.end(); - for (SymbolsList::const_iterator it = symbols.begin(); it != end; ++it) { + SymbolsList::const_iterator const end = symbols_.end(); + for (SymbolsList::const_iterator it = symbols_.begin(); it != end; ++it) { char_type c = *it; #if QT_VERSION >= 0x040300 QChar::Category const cat = QChar::category(uint(c));