我正在使用wxConfBase來保存我的文本框的數據。 (windows)wxWidgets wxConfBase寫入很慢
config = new wxConfig(wxT("soft"));
config->Write(wxT("COM"),temp_port->GetValue());
config->Write(wxT("SQL_HOST"),mainset_sql_host->GetValue());
config->Write(wxT("SQL_DB"),mainset_sql_db->GetValue());
config->Write(wxT("SQL_LOGIN"),mainset_sql_login->GetValue());
config->Write(wxT("SQL_PASS"),mainset_sql_pass->GetValue());
{.......}
delete config;
我在我的關閉功能上調用它。
事實上,它非常慢,需要大約10秒(程序凍結)寫約20個參數。
我相信它寫在我的本地磁盤上,因爲我一直無法找到保存的地獄,甚至嘗試使用config-> SetPath。
另外,對文件的訪問我的電腦上並不似乎是慢......
而且也許有比使用配置寫的一些更有效的方式。
如果有人有想法,謝謝。
謝謝,絕對不是用來存儲設置的好東西...... – Damien