Bug 249138 - [performance] Improve deferred loading of SystemMessages.xml
Summary: [performance] Improve deferred loading of SystemMessages.xml
Status: ASSIGNED
Alias: None
Product: Target Management
Classification: Tools
Component: RSE (show other bugs)
Version: 3.1   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: Future   Edit
Assignee: dsdp.tm.rse-inbox CLA
QA Contact: Martin Oberhuber CLA
URL:
Whiteboard:
Keywords: performance
Depends on: 246406
Blocks:
  Show dependency tree
 
Reported: 2008-09-30 11:45 EDT by Martin Oberhuber CLA
Modified: 2012-11-19 04:57 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Oberhuber CLA 2008-09-30 11:45:10 EDT
+++ This bug was initially created as a clone of Bug #246406 +++

Deferred loading of SystemMessageFile needs to ensure that the file is loaded only once, and that errors are reported properly.

From bug 246406 comment 29:

1. If multiple Threads ask for the same message file at the same time, it may
   be opened and parsed multiple times, which is not optimal. Note, though,
   that this could happen in the previous (synchronous) variant as well.
   As a remedy of this, it might be possible to introduce a ThreadGroup for the
   LoadThread, such that all LoadThread instances are always executed
   sequentially.

2. In the synchronous case, the Bundle which requested a SystemMessageFile
   object opened the Stream for the URL and could thus receive a Throwable,
   which was reported to the end user by means of a MessageBox.
   In the asynchronous case, opening of the Stream from the URL is deferred,
   so that very Throwable is thrown later in a context which has no access
   to the UI -- Users are not informed about the error.
   I'm not sure at the moment how this could be fixed -- right now, my only
   idea is to always open the Stream in the client as it was done before, 
   but - and this would be the API difference - allow the SystemMessageFile
   object/thread to close the Stream later on. That way, at least "file not
   found" messages would be issued to the client rather than the UI-less
   deferred Message File.

From bug 246406 comment 31:

It should work to beef up the MessageFileInfo class such that it can be used as the semaphore for checking attempts to do multiple loads of the xml.
Comment 1 Martin Oberhuber CLA 2010-02-26 19:11:27 EST
Bulk update of target milestones to 3.2