Impreved the performance of the onheap datastructure