Identifying Equivalent Objects to Reduce Memory
Consumption
Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel
Unive...
Introduction
A little about objects
Creating an object is easy
Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Me...
Introduction
A little about objects
Creating an object is easy
Object new
Alejandro Infante, Juan Pablo Sandoval, Alexandr...
Introduction
My application creates lots of objects. Do I need them all?
Alejandro Infante, Juan Pablo Sandoval, Alexandre...
Color Example
Builder>>createNode
ˆ GraphicalElement new color: self defaultColor.
Builder>>defaultColor
"Gray color"
ˆ Co...
Identifying Equivalent Objects to Reduce Memory
Consumption
Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel
Unive...
Object Equivalence
What means Object Equivalence?
Two objects o1 and o2 are said equivalent if all objects pointing to
o1 ...
Object Equivalence
What means Object Equivalence?
Two objects o1 and o2 are said equivalent if all objects pointing to
o1 ...
Object Equivalence
What means Object Equivalence?
Two objects o1 and o2 are said equivalent if all objects pointing to
o1 ...
Object Equivalence
Definition:
Our object equivalence definition says that o1 and o2 are
equivalent if:
o1 and o2 are instan...
Profiling
Memory Profiler
Groups the objects in the execution using the previous
definition.
Alejandro Infante, Juan Pablo Sa...
Results in Roassal
Unnecessary Objects
Detected that 10.97% of the objects are unnecessary object.
Reduction on the total ...
Conclusions and Future Work
What we achieved?
Successfully identified redundant objects in the case.
Successfully removed s...
Upcoming SlideShare
Loading in …5
×

Identifying Equivalent Objects to Reduce Memory Consumption

415 views
356 views

Published on

Identifying Equivalent Objects to Reduce Memory Consumption

Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel

Published in: Technology, Education
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
415
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
1
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Identifying Equivalent Objects to Reduce Memory Consumption

  1. 1. Identifying Equivalent Objects to Reduce Memory Consumption Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Universidad de Chile September, 2013 Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  2. 2. Introduction A little about objects Creating an object is easy Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  3. 3. Introduction A little about objects Creating an object is easy Object new Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  4. 4. Introduction My application creates lots of objects. Do I need them all? Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  5. 5. Color Example Builder>>createNode ˆ GraphicalElement new color: self defaultColor. Builder>>defaultColor "Gray color" ˆ Color r: 0.5 g: 0.5 b: 0.5 Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  6. 6. Identifying Equivalent Objects to Reduce Memory Consumption Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Universidad de Chile September, 2013 Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  7. 7. Object Equivalence What means Object Equivalence? Two objects o1 and o2 are said equivalent if all objects pointing to o1 may instead point to o2 without affecting the program semantics and execution. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  8. 8. Object Equivalence What means Object Equivalence? Two objects o1 and o2 are said equivalent if all objects pointing to o1 may instead point to o2 without affecting the program semantics and execution. Button "Exit" Button "Apply" Button "Copy" Color "Gray" Color "Gray" Color "Gray" Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  9. 9. Object Equivalence What means Object Equivalence? Two objects o1 and o2 are said equivalent if all objects pointing to o1 may instead point to o2 without affecting the program semantics and execution. Button "Exit" Button "Apply" Button "Copy" Color "Gray" Color "Gray" Color "Gray" Button "Exit" Button "Apply" Button "Copy" Color "Gray" Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  10. 10. Object Equivalence Definition: Our object equivalence definition says that o1 and o2 are equivalent if: o1 and o2 are instances of the same class. o1 and o2 have identical state. o1 and o2 do not mutate. Neither o1 nor o2 uses his identity. (i.e. identityHash) The creation of o1 nor o2 preforms a side effect. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  11. 11. Profiling Memory Profiler Groups the objects in the execution using the previous definition. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  12. 12. Results in Roassal Unnecessary Objects Detected that 10.97% of the objects are unnecessary object. Reduction on the total number of Objects Allowed us to reduce the total number of objects in 5.1%. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling
  13. 13. Conclusions and Future Work What we achieved? Successfully identified redundant objects in the case. Successfully removed some of the redundant objects. And now? More strategies to remove unnecessary objects. Alejandro Infante, Juan Pablo Sandoval, Alexandre Bergel Memory Profiling

×