build: adds treesize counting before allocating Hashelement