counsel.el (counsel-unicode-char): Make lazy #1204
This PR is not copyright exempt and I have previously contributed changes amounting to ~15 LOC to this project. I recently contacted firstname.lastname@example.org about the copyright assignment forms and am currently waiting to hear back.
Sorry, I seem to have done an independent bug fix of this in this PR: #1223
I started on this debug from the GNU Elpa side :P
Use lazy completion table to speed up subsequent invocations. Amortised speedup is 2-3x in simulated benchmarks on the author's machine, and subsequent invocations feel instantaneous in practice. Ensure collection is sorted from the outset, as the result of ucs-names is never entirely sorted. This is especially important in later versions returning hash maps, as they have even weaker order guarantees than alists. Consolidate alist and hash table formatting functions: DRY. Improve completion transformer: ensure space between char name and glyph; fit line width to default fill-column of 70, allowing for a maximum char-width of 4. Remove no-op minibuffer-allow-text-properties binding. Add :caller keyword to counsel-unicode-char.