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!)
Question on garbage collection
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="ziphnor" data-source="post: 29253" data-attributes="member: 14215"><p>Hi,</p><p></p><p>Being annoyed with the problems with the Compress plug-in i decided to try to fix it. The problem is that whenever a transcoding job is in progress, the call GC.GetTotalMemory(true) doesnt return(at least within any reasonable time) when called in GUIWindow OnMessage when it gets a GUI_MSG_WINDOW_DEINIT message. This causes the effect that if you try to navigate away from the current window while the job is in progress, the gui blocks/locks.</p><p></p><p>What i would like to know is a bit more about what the GC calls does. According to the documentation for GC.GetTotalMemory:</p><p></p><p>[code] //</p><p> // Summary:</p><p> // Retrieves the number of bytes currently thought to be allocated. A parameter</p><p> // indicates whether this method can wait a short interval before returning,</p><p> // to allow the system to collect garbage and finalize objects.</p><p> //</p><p> // Parameters:</p><p> // forceFullCollection:</p><p> // A Boolean value which, if true, indicates that this method can wait for garbage</p><p> // collection to occur before returning.</p><p> //</p><p> // Returns:</p><p> // A number that is the best available approximation of the number of bytes</p><p> // currently allocated in managed memory.[/code]</p><p></p><p>From this it seems that it will a "short interval" before returning, but this doesnt seem to be the case. However this only happens when a transcoding job is in progress. </p><p></p><p>I fixed the problem in my local installation by changing the call to GC.GetTotalMemory(false). Could the explanation be that the call waits for GC to finish, but GC might run with a very low priority so that it wont run because the transcoding job is eating up all the CPU time, locking the GUI which is waiting for it?</p><p></p><p>I would also like to know why there are 3 call to GC.collect in a row preceding the call to GC.GetTotalMemory, why doesnt one suffice?</p></blockquote><p></p>
[QUOTE="ziphnor, post: 29253, member: 14215"] Hi, Being annoyed with the problems with the Compress plug-in i decided to try to fix it. The problem is that whenever a transcoding job is in progress, the call GC.GetTotalMemory(true) doesnt return(at least within any reasonable time) when called in GUIWindow OnMessage when it gets a GUI_MSG_WINDOW_DEINIT message. This causes the effect that if you try to navigate away from the current window while the job is in progress, the gui blocks/locks. What i would like to know is a bit more about what the GC calls does. According to the documentation for GC.GetTotalMemory: [code] // // Summary: // Retrieves the number of bytes currently thought to be allocated. A parameter // indicates whether this method can wait a short interval before returning, // to allow the system to collect garbage and finalize objects. // // Parameters: // forceFullCollection: // A Boolean value which, if true, indicates that this method can wait for garbage // collection to occur before returning. // // Returns: // A number that is the best available approximation of the number of bytes // currently allocated in managed memory.[/code] From this it seems that it will a "short interval" before returning, but this doesnt seem to be the case. However this only happens when a transcoding job is in progress. I fixed the problem in my local installation by changing the call to GC.GetTotalMemory(false). Could the explanation be that the call waits for GC to finish, but GC might run with a very low priority so that it wont run because the transcoding job is eating up all the CPU time, locking the GUI which is waiting for it? I would also like to know why there are 3 call to GC.collect in a row preceding the call to GC.GetTotalMemory, why doesnt one suffice? [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Development
General Development (no feature request here!)
Question on garbage collection
Contact us
RSS
Top
Bottom