bmag / emacs-purpose

Manage Windows and Buffers According to Purposes
GNU General Public License v3.0
498 stars 23 forks source link

Fix over consing #152

Closed Zulu-Inuoe closed 5 years ago

Zulu-Inuoe commented 5 years ago

This fixes #149

The main fix is to not calculate the list of 'other buffers with same purpose' unless we're going to be replacing the buffer. This prevents calculating said list for buffers that aren't being displayed on any window, in particular, background buffers created with with-temp-buffer and the like.

Additionally, minor efficiency improvements for calculating buffer purpose are included

coveralls commented 5 years ago

Coverage Status

Coverage decreased (-0.03%) to 69.951% when pulling fbbb370cfca274ccb03459f8cd03d6cf45631f06 on Zulu-Inuoe:fix-over-consing into fb649bb07de63a70ecdace464eadcaafe01e1995 on bmag:master.

mfiano commented 5 years ago

I look forward to this being merged. Emacs slows to a crawl after a short while without this.

Zulu-Inuoe commented 5 years ago

Sorry about that! e935c88 is broken because I didn't quote the found catch tag. Pushed a new fix

bmag commented 5 years ago

Thanks a lot! Merged.