PDA

View Full Version : Qmap problem on a static lib



patrik08
30th March 2007, 10:07
I have a 1000 line QMap ...
typedef QMap<int, QStringList> TableAi;

wen i make the static lib on window .. work all fine... Build (7Min.)
the same on linux compiler stay a lot of time to compile 1H. && Load average go to 20%
Why? is better to load on a XML file resource? this params?

Linux have 1GB ram (2GB swap) && Pentium 4 / 3Ghz... &&
Win dual core Intel 1.8 Ghz && 1GB ram (on top from a Mac dual boot)

the moc file stay 2Kb

The function from this lib respond on 30 Msec... on Qmap && 200 Msec on xml resource???





typedef QMap<int, QStringList> TableAi;

Box_att.clear();
Box_att.insert(0,QStringList() << "a" << "100");
Box_att.insert(1,QStringList() << "abi" << "101");
Box_att.insert(2,QStringList() << "abl" << "102");
Box_att.insert(3,QStringList() << "ac" << "103");
Box_att.insert(4,QStringList() << "af" << "104");
Box_att.insert(5,QStringList() << "ag" << "105");
Box_att.insert(6,QStringList() << "al" << "106");
Box_att.insert(7,QStringList() << "ald" << "107");
Box_att.insert(8,QStringList() << "all" << "108");
Box_att.insert(9,QStringList() << "alm" << "109");
Box_att.insert(10,QStringList() << "am" << "110");

wysota
30th March 2007, 12:11
Yes, I suggest you load it runtime or iterate over a statically assembled dataset (you can use the Qt resource system for that).