Google Developers2.4 млн
Опубликовано 19 мая 2015, 17:40
Memory Churn is a constant, and serious problem for the performance of your applications. Allocating loads of temporary objects in a short time frame puts a ton of pressure on your memory heaps, resulting in more GC events being kicked off.
In this video Colt McAnlis, provides a recipe for success here: Rather than promoting a bulk of your objects to static in order to solve memory churn problems, you can utilize an amazingly powerful data structure, known as an Object Pool.
Object Pools are data structures which hold on to un-used objects for you. Basically, rather than freeing an object back to the heap when you’re done with it, you instead, hand it off to the object pool. Later on, when some function wants a new object of that type, you can return the un-used object, rather than going and allocating a new one from the heap.
Watch more Android Performance Patterns here: goo.gl/4ZJkY1
Join the G+ Community here: goo.gl/g7mxmI
Subscribe to the Google Developers channel here: goo.gl/mQyv5L
In this video Colt McAnlis, provides a recipe for success here: Rather than promoting a bulk of your objects to static in order to solve memory churn problems, you can utilize an amazingly powerful data structure, known as an Object Pool.
Object Pools are data structures which hold on to un-used objects for you. Basically, rather than freeing an object back to the heap when you’re done with it, you instead, hand it off to the object pool. Later on, when some function wants a new object of that type, you can return the un-used object, rather than going and allocating a new one from the heap.
Watch more Android Performance Patterns here: goo.gl/4ZJkY1
Join the G+ Community here: goo.gl/g7mxmI
Subscribe to the Google Developers channel here: goo.gl/mQyv5L
Свежие видео
Случайные видео