@Jose
Well, indexes are either referenced from the top of the file, or from the parent index, so the speed issue won't really come into play until you've got hundreds of layers, as your indexes can use offsets to the child indexes or to the data, so a list, say, 4 layers deep, will involve only 4 jumps to definite locations. I suppose the indexes could be put at the start of the file for speed provided they are worked out in memory beforehand. If they can't be calculated before saving they could in theory be put at the end of the file, but then you have the problem that all the data is useless if the file is truncated...
Anyway, still just suggestions, and as you develop I'm sure changes can be made to better suit the situation.