In hindsight I should've made some performance improvements and left after a year, but they hired me to rewrite their 60K LOC configuration webapp in a technology stack of my own choosing so I did. After two and a half years I was at 20% or so and there was no outlook on them actually hiring the full team that it needed like I indicated early on.
So long as I'm around and have a voice the last was the final one. On hindsight we could have refactored the existing code in place for similar costs - and have results to show much quicker, while a few rarely used features that we decided not to rewrite would still be working (with the old ugly UI).