One file was 7000 LoC and had one class that was used all over the code-base.
This application was basically a bad PHP version of GWT. So all it did was creating hundreds of lines of JavaScript code on the server and sending them to the browser on every click, all neatly nested with with().
The debugger would crash if I set a breakpoint in the big class and the client code would change every click.
As you can imagine, there were multiple bugs in this code-base and I don't really know how I fixed it in the course of two years, but somehow it was stable at the end.
That itself is a horrifying miracle - know the original programmers who did the implementation?
Had similar experiences with several thousand of lines of PHP code, by multiple people, with many easy to miss performance hits (at its time), that took forever to refactor out.
And by refactor, it meant rewrite in a another language XD
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Had to maintain a legacy PHP project.
One file was 7000 LoC and had one class that was used all over the code-base.
This application was basically a bad PHP version of GWT. So all it did was creating hundreds of lines of JavaScript code on the server and sending them to the browser on every click, all neatly nested with
with()
.The debugger would crash if I set a breakpoint in the big class and the client code would change every click.
As you can imagine, there were multiple bugs in this code-base and I don't really know how I fixed it in the course of two years, but somehow it was stable at the end.
Getting it stable is one thing, how fast could you get it to respond with all that bloat .... on every click?
I don't know why, but performance was okay-ish.
Probably because most logic was handled already in PHP and it was much, but simple, JavaScript.
That itself is a horrifying miracle - know the original programmers who did the implementation?
Had similar experiences with several thousand of lines of PHP code, by multiple people, with many easy to miss performance hits (at its time), that took forever to refactor out.
And by refactor, it meant rewrite in a another language XD