webdiff icon indicating copy to clipboard operation
webdiff copied to clipboard

Optimize page load time

Open danvk opened this issue 10 years ago • 5 comments

When I run git webdiff, it takes ~3 seconds to see diff content in my browser.

Almost none of that time is spent in the app.py script (it's ~0.1s). Much more is spent on the diff page itself. Main sources of slowness include:

  1. Tons of JS files
  2. Using built-in JSXTransformer
  3. Issuing an XHR for the diff data

All of these could be fixed.

danvk avatar Jul 22 '15 18:07 danvk

@NikolasOliveira @daytonb if either of you is feeling inspired, this would be a great task for the next release. The browser is recompiling the webdiff JavaScript on every page load. We should just do that once and distribute the built, minified bundle.

danvk avatar May 29 '17 14:05 danvk

@danvk I'm pretty busy until about mid June. But this does look like a nice feature to work on next. We should also merge in #109 for the next release. That PR has been open a long while now.

Cheers, Niko

NikolasOliveira avatar May 29 '17 18:05 NikolasOliveira

@NikolasOliveira sounds good. I just merged that PR :)

danvk avatar May 29 '17 18:05 danvk

@danvk nice, problem solved! :)

NikolasOliveira avatar May 29 '17 18:05 NikolasOliveira

I don't know any javascript, so I don't know that I could tackle that task.

daytonb avatar May 30 '17 11:05 daytonb

I'm going to close this. If anyone has found webdiff slow in the past five years, they can file a new issue.

danvk avatar Sep 17 '22 21:09 danvk