facelessuser / MarkdownPreview

Markdown preview and build plugin for Sublime Text https://facelessuser.github.io/MarkdownPreview/
Other
402 stars 53 forks source link

on_post_save: exit quickly if the current file is not Markdown #126

Closed charlievieth closed 2 years ago

charlievieth commented 3 years ago

This commit speeds up the on_post_save() method for non-Markdown files by checking if the current file type is Markdown before continuing. This does not alter the logic of the on_post_save() method.

Previously, on_post_save() took ~10ms on non-Markdown files after this change it takes roughly ~1ms.

facelessuser commented 3 years ago

Cool. I'll take a closer look soon. It may not get into the next release as I'm very close to getting it out the door, but I imagine we can get it in very soon afterward. I just have a lot of things I'm trying to get out the door right now 🙂.

facelessuser commented 2 years ago

Better late than never.

@gir-bot lgtm