In many Giraph applications, graphs are immutable, but edges are never trimmed to the proper size, after input phase. This means that on average we often use 1.5x memory for storing them. Considering we are often memory bounded, adding an option to trim the edges after the input phase will help reduce this excess memory usage. For mutable graphs, we can also provide an option for the same method to be called after each superstep.
Review request: https://reviews.apache.org/r/21119/