Closed owallb closed 2 months ago
I made a mistake and didn't call groupName
for retrieving the group name. Now that I fixed it, the original issue still remains, which is that calling groupName will sometimes be very slow. I will close this and continue to investigate a different solution.
For future reference, the issue was that I had built with CGO_ENABLED=1. Instead building with CGO_ENABLED=0 fixed the random freezes. It seems the cgo implementation of LookupGroupId in os/user is slow for whatever reason.
After using the new user and group info parameters for a while I have started to notice an occasional slow-down, when quickly navigating down/up in the same directory.
I investigated the time it would take retrieve user and group max widths, where total is the whole getInfo loop:
I'm not really sure why getGroupWidth was so slow.
15 ms is not slow enough that I would notice it, what I experienced was that the UI would freeze for about 1 second. But it's probably related to the cause of it.