Java API: performance optimization - use LongSparseArray instead of HashMap