nojanath / SublimeKSP

Fork of Nils Liberg's SublimeKSP plugin. See README for details.
GNU General Public License v3.0
86 stars 18 forks source link

Compilation does not take into account changes to files until they are saved. #406

Closed raptor-666 closed 6 months ago

raptor-666 commented 10 months ago

Previously, changes to files were taken into account in compilation without the need to save them. I assume this bug appeared because of the folder import support introduced in the last update.

hinnar commented 10 months ago

Confirm

mkruselj commented 9 months ago

No, this is an intentional change that sped up compile times by 10 seconds in some cases. It's this change here. That find_view_by_filename call is slow, and then also potentially copies huge strings which is a performance drain.

mkruselj commented 6 months ago

OK after looking more into this, I don't think a revert to old behavior is possible, since imports are now handled by the sKSP preprocessor rather than the Sublime Text plugin layer (which was the case before). Which means the compiler has no knowledge of the text buffer views from SublimeKSP, it just does an io.open() and reads the file directly from the hard drive with whatever last saved state it had.