secondlife / viewer

🖥️ Second Life's official client
GNU Lesser General Public License v2.1
211 stars 53 forks source link

Avoid reading the same XML file multiple times #819

Open LLGuru opened 8 months ago

LLGuru commented 8 months ago

Environment

Any version of SecondLife viewer

Description

Some XML files are being read very often, multiple times per session

For chat messages:

indra\newview\skins\default\xui\en\panel_chat_header.xml
indra\newview\skins\default\xui\en\inspector_info_ctrl.xml
indra\newview\skins\default\xui\en\panel_chat_separator.xml

For notifications:

indra\newview\skins\default\xui\en\favorites_bar_button.xml
indra\newview\skins\default\xui\en\panel_notification.xml
indra\newview\skins\default\xui\en\panel_toast.xml

And maybe some other files, needs investigate

Reproduction steps

  1. Create file logcontrol-dev.xml in the folder C:\Users\user\AppData\Roaming\SecondLife\user_settings with the following contents:

    <llsd>
    <map>
    <key>default-level</key>
    <string>ERROR</string>
    <key>print-location</key>
    <boolean>false</boolean>
    <key>settings</key>
    <array>
    <map>
    <key>level</key>
    <string>DEBUG</string>
    <key>functions</key>
    <array>
     <string>parseFile</string>
    </array>
    </map>
    </array>
    </map>
    </llsd>
  2. Start SL viewer, open chat floater, view notifications and so on

  3. Close viewer

  4. Read the file C:\Users\user\AppData\Roaming\SecondLife\logs\SecondLife.log

  5. Verify repeated readings of the same XML files

Links

Is integrated into

LLGuru commented 8 months ago

Fixed in https://github.com/secondlife/viewer/pull/844

vladyslavasproductengine commented 8 months ago

Hello @LLGuru!

Could you please clarify most logs with such warning for Win10. Is it expected behavior? 2024-03-07T11:26:46Z WARNING # llcommon/llinitparam.cpp(103) LLInitParam::Parser::parserWarning : Failed to parse parameter "auto_resize.": C:\Program Files\SecondLifeViewer\WARNING\floater_im_session.xml(340)

LLGuru commented 8 months ago

Hello @vladyslavasproductengine

No, this error doesn't relate to the current issue

akleshchev commented 8 months ago

Is it expected behavior? Failed to parse parameter "auto_resize."

Not expected, but not related to this issue either.

georgebproductengine commented 7 months ago

Failed QA. Verified on the Second Life Release 7.1.4.8333131717 (64bit) on Win10/OSX in the scope of https://github.com/secondlife/iqa/issues/163.

SecondLife.log
2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\app_settings\\settings_files.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\strings.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\language_settings.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\colors.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Users\\TEST\\AppData\\Roaming\\SecondLife\\user_settings\\colors.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\strings.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\language_settings.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\notifications.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\role_actions.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\teleport_strings.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\mime_types.xml 2024-03-25T12:33:08Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\fonts.xml 2024-03-25T12:33:13Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\textures\\textures.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\panel.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\ui_ctrl.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\main_view.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\layout_stack.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\icon.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\panel_progress.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\text.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\textbase.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\progress_bar.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\control_table_contents_movement.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\control_table_contents_camera.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\control_table_contents_editing.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\control_table_contents_media.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\button.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\web_browser.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\window_shade.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\panel_toolbar_view.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\toolbar.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\floater.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\floater_fast_timers.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\combo_box.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\scroll_list.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\scroll_bar.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\scroll_column_header.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\floater_sys_well.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\flat_list_view.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\scroll_container.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\view_border.xml 2024-03-25T12:33:17Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\xui_version.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\menu.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_edit.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\menu_item_call.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\menu_item.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\menu_item_separator.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_avatar_self.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\context_menu.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_avatar_other.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\menu_item_check.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_object.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_attachment_self.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_attachment_other.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_land.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_mute_particle.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_viewer.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\menu_bar.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\menu_item_tear_off.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\menu_login.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\panel_login.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\line_editor.xml 2024-03-25T12:33:18Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\check_box.xml 2024-03-25T12:33:26Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\tool_tip.xml 2024-03-25T12:33:42Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\panel_chiclet_bar.xml 2024-03-25T12:33:42Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\chiclet_panel.xml 2024-03-25T12:33:42Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\floater_notifications_tabbed.xml 2024-03-25T12:33:42Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : parsing XML file: C:\\Program Files\\SecondLifeViewer\\skins\\default\\xui\\en\\widgets\\tab_container.xml 2024-03-25T12:33:42Z DEBUG #XMLNode# llxml/llxmlnode.cpp(657) LLXMLNode::parseFile : pars...
LLGuru commented 7 months ago

The fix (https://github.com/secondlife/viewer/pull/844) was merged to maint-A and should be tested on that version image

igorlproductengine commented 6 months ago

Passed QA. Verified on the Second Life Release 7.1.7.8993168213 (64bit) Win10/OSX in scope https://github.com/secondlife/iqa/issues/226.

AtlasLinden commented 6 months ago

Sending back to Testing to account for https://github.com/secondlife/viewer/issues/1420#issuecomment-2110634409

akleshchev commented 5 months ago

Potential issue: deep copy isn't preserving order which results in components being shifted thus causing https://github.com/secondlife/viewer-private/issues/239 and https://github.com/secondlife/viewer/issues/1420

DmitrySProductengine commented 4 months ago

Failed QA. Verified on the Second Life Release 7.1.9.9473057952 (64bit) on Win10/OSX in the scope of IQA #260. The logs still contain repetitions of parsing XML files. See the attached ‘7.1.9.9473057952 - SecondLife.log’ log. 7.1.9.9473057952 - SecondLife.log