Mark Amery

Results 116 comments of Mark Amery

After taking a look at this, I'm very confident that it *should* be possible to make this enormously faster. I think there are actually two problems here. **The first is...

Okay, I have [a PR on jsdiff](https://github.com/kpdecker/jsdiff/pull/411) that makes it orders of magnitude faster in at least *my* test case above. (I haven't tried out @tmcw's one from the first...

@tmcw's example actually takes *way* longer than 14s for me - almost 5 minutes, in fact! Not sure what accounts for the difference in what we observed; perhaps something relevant...

I've got a draft PR at https://github.com/prettier/prettier/pull/15709 implementing the idea of recording what two nodes the cursor falls _between_ and thus being able to diff much smaller strings than when...

Oh, by the way, my PR totally works on @tmcw's benchmark. Runtime down from 5 minutes on main to 150 milliseconds on my branch! Just need to get it to...

I've been in touch with @kpdecker, the maintainer of jsdiff. He's busy with other stuff in his life and doesn't want to spend much time on jsdiff, so at my...

In other news, I reckon https://github.com/prettier/prettier/pull/15709 is review-ready.

@fisker just in case you're not aware, note this is ready for review and has been for a while.

Ooh, sorry, missed the comment above somehow. Yeah, I think the new `cursorStart` & `cursorEnd` *only* need to exist to handle the scenario where a third-party plugin reorders AST nodes....

Fair enough; I've removed the new `cursorStart` and `cursorEnd` in favour of just using `cursor`.