Commit 8f484d7
committed
Optimize diff-hl--update
This adds two optimizations during the buffer traversal.
First, (eq buf base) is checked before calling (buffer-base-buffer buf).
This short-circuits evaluation to bypass the buffer-base-buffer call
overhead.
Second, the boolean state of (or changes ref-changes) outside the loop.
This prevents the Lisp interpreter from recalculating the same static
condition for all active buffers.1 parent ca4391f commit 8f484d7
1 file changed
Lines changed: 15 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
741 | 741 | | |
742 | 742 | | |
743 | 743 | | |
744 | | - | |
| 744 | + | |
| 745 | + | |
745 | 746 | | |
746 | 747 | | |
747 | | - | |
| 748 | + | |
| 749 | + | |
748 | 750 | | |
749 | 751 | | |
| 752 | + | |
750 | 753 | | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
760 | 764 | | |
761 | 765 | | |
762 | 766 | | |
| |||
0 commit comments