Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UniqueId.suggest: remove unnecessary memory allocation.
If there was N suggestions, we'd allocate N strings unnecessarily. When trying to check whether a UID is already in the cache, we can check either the forward mapping (name -> ID) or the backward mapping (ID -> name), but the former doesn't require any memory allocation so do that instead (the latter requires converting a byte[] to a String). Change-Id: I11b1e30e6c8f4f5cfadd2068216610311a950393 Reviewed-by: Berk D. Demir <bdd@mindcast.org>
- Loading branch information