Commit 3d8c48e0 authored by jean-pierre charras's avatar jean-pierre charras

Speed up DIALOG_LOAD_ERROR::ListSet(), used to display lists of errors ( up to...

Speed up DIALOG_LOAD_ERROR::ListSet(), used to display lists of errors ( up to 100 x faster) in DRC or loading lib errors
parent ea8f9c61
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<wxFormBuilder_Project> <wxFormBuilder_Project>
<FileVersion major="1" minor="9" /> <FileVersion major="1" minor="10" />
<object class="Project" expanded="1"> <object class="Project" expanded="1">
<property name="class_decoration"></property> <property name="class_decoration" />
<property name="code_generation">C++</property> <property name="code_generation">C++</property>
<property name="disconnect_events">1</property> <property name="disconnect_events">1</property>
<property name="encoding">UTF-8</property> <property name="encoding">UTF-8</property>
<property name="event_generation">connect</property> <property name="event_generation">connect</property>
<property name="file">dialog_display_info_HTML_base</property> <property name="file">dialog_display_info_HTML_base</property>
<property name="first_id">1000</property> <property name="first_id">1000</property>
<property name="help_provider">none</property> <property name="help_provider">none</property>
<property name="internationalize">1</property> <property name="internationalize">1</property>
<property name="name">dialog_display_info_HTML</property> <property name="name">dialog_display_info_HTML</property>
<property name="namespace"></property> <property name="namespace" />
<property name="path">.</property> <property name="path">.</property>
<property name="precompiled_header"></property> <property name="precompiled_header" />
<property name="relative_path">1</property> <property name="relative_path">1</property>
<property name="use_enum">0</property> <property name="use_enum">0</property>
<property name="use_microsoft_bom">0</property> <property name="use_microsoft_bom">0</property>
<object class="Dialog" expanded="1"> <object class="Dialog" expanded="1">
<property name="bg"></property> <property name="bg" />
<property name="center"></property> <property name="center" />
<property name="context_help"></property> <property name="context_help" />
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="extra_style"></property> <property name="extra_style" />
<property name="fg"></property> <property name="fg" />
<property name="font"></property> <property name="font" />
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="maximum_size" />
<property name="minimum_size">400,120</property> <property name="minimum_size">400,120</property>
<property name="name">DIALOG_DISPLAY_HTML_TEXT_BASE</property> <property name="name">DIALOG_DISPLAY_HTML_TEXT_BASE</property>
<property name="pos"></property> <property name="pos" />
<property name="size">431,120</property> <property name="size">431,120</property>
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property> <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
<property name="subclass"></property> <property name="subclass" />
<property name="title"></property> <property name="title" />
<property name="tooltip"></property> <property name="tooltip" />
<property name="window_extra_style"></property> <property name="window_extra_style" />
<property name="window_name"></property> <property name="window_name" />
<property name="window_style"></property> <property name="window_style" />
<event name="OnActivate"></event> <event name="OnActivate" />
<event name="OnActivateApp"></event> <event name="OnActivateApp" />
<event name="OnChar"></event> <event name="OnChar" />
<event name="OnClose"></event> <event name="OnClose" />
<event name="OnEnterWindow"></event> <event name="OnEnterWindow" />
<event name="OnEraseBackground"></event> <event name="OnEraseBackground" />
<event name="OnHibernate"></event> <event name="OnHibernate" />
<event name="OnIconize"></event> <event name="OnIconize" />
<event name="OnIdle"></event> <event name="OnIdle" />
<event name="OnInitDialog"></event> <event name="OnInitDialog" />
<event name="OnKeyDown"></event> <event name="OnKeyDown" />
<event name="OnKeyUp"></event> <event name="OnKeyUp" />
<event name="OnKillFocus"></event> <event name="OnKillFocus" />
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow" />
<event name="OnLeftDClick"></event> <event name="OnLeftDClick" />
<event name="OnLeftDown"></event> <event name="OnLeftDown" />
<event name="OnLeftUp"></event> <event name="OnLeftUp" />
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick" />
<event name="OnMiddleDown"></event> <event name="OnMiddleDown" />
<event name="OnMiddleUp"></event> <event name="OnMiddleUp" />
<event name="OnMotion"></event> <event name="OnMotion" />
<event name="OnMouseEvents"></event> <event name="OnMouseEvents" />
<event name="OnMouseWheel"></event> <event name="OnMouseWheel" />
<event name="OnPaint"></event> <event name="OnPaint" />
<event name="OnRightDClick"></event> <event name="OnRightDClick" />
<event name="OnRightDown"></event> <event name="OnRightDown" />
<event name="OnRightUp"></event> <event name="OnRightUp" />
<event name="OnSetFocus"></event> <event name="OnSetFocus" />
<event name="OnSize"></event> <event name="OnSize" />
<event name="OnUpdateUI"></event> <event name="OnUpdateUI" />
<object class="wxBoxSizer" expanded="1"> <object class="wxBoxSizer" expanded="1">
<property name="minimum_size">-1,-1</property> <property name="minimum_size">-1,-1</property>
<property name="name">bMainSizer</property> <property name="name">bMainSizer</property>
<property name="orient">wxVERTICAL</property> <property name="orient">wxVERTICAL</property>
<property name="permission">none</property> <property name="permission">none</property>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxEXPAND</property> <property name="flag">wxEXPAND</property>
<property name="proportion">1</property> <property name="proportion">1</property>
<object class="wxHtmlWindow" expanded="1"> <object class="wxHtmlWindow" expanded="1">
<property name="bg"></property> <property name="bg" />
<property name="context_help"></property> <property name="context_help" />
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg" />
<property name="font"></property> <property name="font" />
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_ANY</property> <property name="id">wxID_ANY</property>
<property name="maximum_size"></property> <property name="maximum_size" />
<property name="minimum_size">-1,-1</property> <property name="minimum_size">-1,-1</property>
<property name="name">m_htmlWindow</property> <property name="name">m_htmlWindow</property>
<property name="permission">public</property> <property name="permission">public</property>
<property name="pos"></property> <property name="pos" />
<property name="size"></property> <property name="size" />
<property name="style">wxHW_SCROLLBAR_AUTO</property> <property name="style">wxHW_SCROLLBAR_AUTO</property>
<property name="subclass"></property> <property name="subclass" />
<property name="tooltip"></property> <property name="tooltip" />
<property name="window_extra_style"></property> <property name="window_extra_style" />
<property name="window_name"></property> <property name="window_name" />
<property name="window_style">wxSUNKEN_BORDER</property> <property name="window_style">wxSUNKEN_BORDER</property>
<event name="OnChar"></event> <event name="OnChar" />
<event name="OnEnterWindow"></event> <event name="OnEnterWindow" />
<event name="OnEraseBackground"></event> <event name="OnEraseBackground" />
<event name="OnHtmlCellClicked"></event> <event name="OnHtmlCellClicked" />
<event name="OnHtmlCellHover"></event> <event name="OnHtmlCellHover" />
<event name="OnHtmlLinkClicked">OnHTMLLinkClicked</event> <event name="OnHtmlLinkClicked">OnHTMLLinkClicked</event>
<event name="OnKeyDown"></event> <event name="OnKeyDown" />
<event name="OnKeyUp"></event> <event name="OnKeyUp" />
<event name="OnKillFocus"></event> <event name="OnKillFocus" />
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow" />
<event name="OnLeftDClick"></event> <event name="OnLeftDClick" />
<event name="OnLeftDown"></event> <event name="OnLeftDown" />
<event name="OnLeftUp"></event> <event name="OnLeftUp" />
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick" />
<event name="OnMiddleDown"></event> <event name="OnMiddleDown" />
<event name="OnMiddleUp"></event> <event name="OnMiddleUp" />
<event name="OnMotion"></event> <event name="OnMotion" />
<event name="OnMouseEvents"></event> <event name="OnMouseEvents" />
<event name="OnMouseWheel"></event> <event name="OnMouseWheel" />
<event name="OnPaint"></event> <event name="OnPaint" />
<event name="OnRightDClick"></event> <event name="OnRightDClick" />
<event name="OnRightDown"></event> <event name="OnRightDown" />
<event name="OnRightUp"></event> <event name="OnRightUp" />
<event name="OnSetFocus"></event> <event name="OnSetFocus" />
<event name="OnSize"></event> <event name="OnSize" />
<event name="OnUpdateUI"></event> <event name="OnUpdateUI" />
</object> </object>
</object> </object>
<object class="sizeritem" expanded="1"> <object class="sizeritem" expanded="1">
<property name="border">5</property> <property name="border">5</property>
<property name="flag">wxALIGN_RIGHT|wxRIGHT|wxLEFT</property> <property name="flag">wxALIGN_RIGHT|wxRIGHT|wxLEFT</property>
<property name="proportion">0</property> <property name="proportion">0</property>
<object class="wxButton" expanded="1"> <object class="wxButton" expanded="1">
<property name="bg"></property> <property name="bg" />
<property name="context_help"></property> <property name="context_help" />
<property name="default">1</property> <property name="default">1</property>
<property name="enabled">1</property> <property name="enabled">1</property>
<property name="fg"></property> <property name="fg" />
<property name="font"></property> <property name="font" />
<property name="hidden">0</property> <property name="hidden">0</property>
<property name="id">wxID_CANCEL</property> <property name="id">wxID_CANCEL</property>
<property name="label">Close</property> <property name="label">Close</property>
<property name="maximum_size"></property> <property name="maximum_size" />
<property name="minimum_size"></property> <property name="minimum_size" />
<property name="name">m_buttonClose</property> <property name="name">m_buttonClose</property>
<property name="permission">protected</property> <property name="permission">protected</property>
<property name="pos"></property> <property name="pos" />
<property name="size"></property> <property name="size" />
<property name="style">wxBU_EXACTFIT</property> <property name="style">wxBU_EXACTFIT</property>
<property name="subclass"></property> <property name="subclass" />
<property name="tooltip"></property> <property name="tooltip" />
<property name="window_extra_style"></property> <property name="window_extra_style" />
<property name="window_name"></property> <property name="window_name" />
<property name="window_style"></property> <property name="window_style" />
<event name="OnButtonClick">OnCloseButtonClick</event> <event name="OnButtonClick">OnCloseButtonClick</event>
<event name="OnChar"></event> <event name="OnChar" />
<event name="OnEnterWindow"></event> <event name="OnEnterWindow" />
<event name="OnEraseBackground"></event> <event name="OnEraseBackground" />
<event name="OnKeyDown"></event> <event name="OnKeyDown" />
<event name="OnKeyUp"></event> <event name="OnKeyUp" />
<event name="OnKillFocus"></event> <event name="OnKillFocus" />
<event name="OnLeaveWindow"></event> <event name="OnLeaveWindow" />
<event name="OnLeftDClick"></event> <event name="OnLeftDClick" />
<event name="OnLeftDown"></event> <event name="OnLeftDown" />
<event name="OnLeftUp"></event> <event name="OnLeftUp" />
<event name="OnMiddleDClick"></event> <event name="OnMiddleDClick" />
<event name="OnMiddleDown"></event> <event name="OnMiddleDown" />
<event name="OnMiddleUp"></event> <event name="OnMiddleUp" />
<event name="OnMotion"></event> <event name="OnMotion" />
<event name="OnMouseEvents"></event> <event name="OnMouseEvents" />
<event name="OnMouseWheel"></event> <event name="OnMouseWheel" />
<event name="OnPaint"></event> <event name="OnPaint" />
<event name="OnRightDClick"></event> <event name="OnRightDClick" />
<event name="OnRightDown"></event> <event name="OnRightDown" />
<event name="OnRightUp"></event> <event name="OnRightUp" />
<event name="OnSetFocus"></event> <event name="OnSetFocus" />
<event name="OnSize"></event> <event name="OnSize" />
<event name="OnUpdateUI"></event> <event name="OnUpdateUI" />
</object> </object>
</object> </object>
</object> </object>
</object> </object>
</object> </object>
</wxFormBuilder_Project> </wxFormBuilder_Project>
...@@ -31,14 +31,14 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &aList) ...@@ -31,14 +31,14 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &aList)
wxArrayString* wxStringSplit( wxString txt, wxChar splitter ); wxArrayString* wxStringSplit( wxString txt, wxChar splitter );
wxArrayString* strings_list = wxStringSplit( aList, wxChar('\n') ); wxArrayString* strings_list = wxStringSplit( aList, wxChar('\n') );
m_htmlWindow->AppendToPage(wxT("<ul>") ); wxString msg = wxT("<ul>");
for ( unsigned ii = 0; ii < strings_list->GetCount(); ii ++ ) for ( unsigned ii = 0; ii < strings_list->GetCount(); ii ++ )
{ {
m_htmlWindow->AppendToPage(wxT("<li>") ); msg += wxT("<li>");
m_htmlWindow->AppendToPage( strings_list->Item(ii) ); msg += strings_list->Item(ii) + wxT("</li>");
m_htmlWindow->AppendToPage(wxT("</li>") );
} }
m_htmlWindow->AppendToPage(wxT("</ul>") ); msg += wxT("</ul>");
m_htmlWindow->AppendToPage( msg );
delete strings_list; delete strings_list;
} }
...@@ -50,14 +50,14 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &aList) ...@@ -50,14 +50,14 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &aList)
*/ */
void DIALOG_LOAD_ERROR::ListSet(const wxArrayString &aList) void DIALOG_LOAD_ERROR::ListSet(const wxArrayString &aList)
{ {
m_htmlWindow->AppendToPage(wxT("<ul>") ); wxString msg = wxT("<ul>");
for ( unsigned ii = 0; ii < aList.GetCount(); ii ++ ) for ( unsigned ii = 0; ii < aList.GetCount(); ii ++ )
{ {
m_htmlWindow->AppendToPage(wxT("<li>") ); msg += wxT("<li>");
m_htmlWindow->AppendToPage( aList.Item(ii) ); msg += aList.Item(ii) + wxT("</li>");
m_htmlWindow->AppendToPage(wxT("</li>") );
} }
m_htmlWindow->AppendToPage(wxT("</ul>") ); msg += wxT("</ul>");
m_htmlWindow->AppendToPage( msg );
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment