Just to give you an update. We have found and fixed the issue with the slower sort times on longs. It was a problem in our code. We're not certain how this got missed for so long, but we had a custom sort normalizer on our long fields and this was adding the overhead.
Originally we operated in some environments that had trouble dealing with big ints. So we were passing this data as a string. However, to get correct sorting behavior we needed to treat the content as a long. So we added a custom sort normalizer that did something like:
When the original data was of type String, the toString wasn't too bad, and we needed the parseLong. However, over time we converted the actual data to a Long. But somehow the code that was adding the custom sort normalizer did not get removed. This then became horribly inefficient because it was now first converting the Long to a String and then parsing it back to a Long again. Yuk! Just removing the sort normalizer fixed the issue.
Thank you for the time you spent trying to help us track this down.
Originally we operated in some environments that had trouble dealing with big ints. So we were passing this data as a string. However, to get correct sorting behavior we needed to treat the content as a long. So we added a custom sort normalizer that did something like:
Code:
return Long.parseLong(value.toString());
Thank you for the time you spent trying to help us track this down.
Comment