home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Yet a couple of other performance suggestions
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="ojo" data-source="post: 3071" data-attributes="member: 10402"><p>What do You thing of the following solution:</p><p></p><p>Make AMS.Profile.XML a Singleton, created only-once and the same instance getting reused all over the code.</p><p></p><p>The Contructor should read the file into interal XMDocument structure m_doc once and for all.</p><p></p><p>But setting up a FileWatcher on the file to make sure when the file eventually gets changed the file will be re-read into m_doc. But only then. Until that occurs every "instantiation" would be changed to a getInstance and every read-operation would therefore be converted to a memory only operation.</p><p></p><p>Internally a good part of the check for file is read and so-on would be removed optimizing the code further.</p><p></p><p>But the overhead would be registering an event for the FileWatcher stuff. But since this is a "system-routine" I'd expect this to be fairly cheap.</p><p></p><p>I'll be happy to supply some code, but I would like Your comments before changing the code.</p><p></p><p>Ojo</p></blockquote><p></p>
[QUOTE="ojo, post: 3071, member: 10402"] What do You thing of the following solution: Make AMS.Profile.XML a Singleton, created only-once and the same instance getting reused all over the code. The Contructor should read the file into interal XMDocument structure m_doc once and for all. But setting up a FileWatcher on the file to make sure when the file eventually gets changed the file will be re-read into m_doc. But only then. Until that occurs every "instantiation" would be changed to a getInstance and every read-operation would therefore be converted to a memory only operation. Internally a good part of the check for file is read and so-on would be removed optimizing the code further. But the overhead would be registering an event for the FileWatcher stuff. But since this is a "system-routine" I'd expect this to be fairly cheap. I'll be happy to supply some code, but I would like Your comments before changing the code. Ojo [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Yet a couple of other performance suggestions
Contact us
RSS
Top
Bottom