www.500px.tv's slideshow leaks
Reported by
hu...@vewd.com,
Nov 7 2017
|
||
Issue description
Chrome Version: 63.0.3236.7
OS: Linux
What steps will reproduce the problem?
(1) Go to www.500px.tv
(2) Press ENTER to bring up the display.
(3) Press DOWN to enter Full Screen.
(4) Press ENTER again to bring up the display.
(5) Press DOWN to start Slideshow.
Now start looking at the Chrome processes' RSS/PSS and Private Dirty memory by summing SUM X_i (/proc/X_i/smaps).
(6) Let the slide show run for 10 minutes with bellow trick:
$scope.nextSlide = function() {
$scope.slideshow.promise = $timeout(function(){
$scope.advance();
if($scope.slideshow.running){
$scope.nextSlide();
};
}, 500); // Changed from 7500 to run the slideshow faster.
};
What is the expected result?
The webpage removes old <img>s before appending new ones:
// remove the first image in the set
if(scope.current.index > 0){
$('.flow_wrapper .photo:first-child',element).remove();
}
Above JQuery results into:
elem.parentNode.removeChild( elem ); // Removes the <div> that contains the <img>.
Since the <div> containing the <img> is removed, I expected the <img>'s memory to be GC'ed.
What happens instead?
Chrome's sum of Private Dirty memory increases linearly (see attached graph).
I guess the <img>s end up in "discardable memory"? But the cleanup of discardable memory is not done? Why not?
More notes:
When I exit the slideshow by navigating to about:blank the memory is eventually cleaned up (GC'ed).
However, if leaving the slideshow running for a few hours on a low memory device, we will soon reach out-of-memory.
,
Nov 13 2017
I believe this is a bug in the webpage. DevTools's Memory snapshot tells me the <img>s are left in Detached DOM trees... |
||
►
Sign in to add a comment |
||
Comment 1 by hu...@vewd.com
, Nov 9 201758.3 KB
58.3 KB View Download
114 KB
114 KB View Download
53.8 KB
53.8 KB View Download