secondlife / secondlife/viewer

Avoid reading the same XML file multiple times

Open
#819 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug enhancement team:viewer
Dominant language
C++
Stars
299
Forks
146
Avg merge
1d 9h
Merged PRs (30d)
88

Description

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>
  1. Start SL viewer, open chat floater, view notifications and so on

  2. Close viewer

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

  4. Verify repeated readings of the same XML files

Links

Is integrated into

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the report with logcontrol-dev.xml and inspect SecondLife.log for repeated parseFile entries. Trace the listed chat and notification XML files under indra/newview/skins/default/xui/en, then determine the relevant loading paths. Done means the same XML resources are no longer read repeatedly during a viewer session and the behavior is verified in the log.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop, performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.