253: diff view hangs for more than 100 files
- Fixed
- Review Board
sixten******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
April 20, 2008 |
when the diff contains 101 or more modified files the diff view never returns with any output. when creating a diff that contains exactly 100 modified files the diff view just works fine. within a few seconds the output is generated. my installed system: revision log: 964
It's a coincidence that it's 101+. I would say just don't do this, as there really isn't a great fix, but I'll keep it open in case we somehow find a fix for this.
-
+ Component-DiffViewer
this is the very first problem I hit...
this is coming up quite often in our environment, to the point that I've been asked to write a script that automatically breaks diffs up :( do you understand exactly what the problem is? perhaps I could take a look at fixing it.
I believe it's just that it takes a long time to parse (we could definitely optimize better) and a while to generate the template (doing interline diffs and all), especially if you have syntax highlighting on. Another large part of it is that the browser has a hard time rendering so much content on some computers (the DOM gets to be quite large). I had a workaround in mind for such cases where, when the diffset is 20+ files, we collapse all the diffs after the first 10 or whatever and allow for expanding them manually. When expanded, we query the server for the diff of that file only, so that we're not doing this for all the diffs in one go. Another option is to paginate the diff viewer.
-
- Priority-Low + Priority-High
Yeah, that makes sense. Even if reviewboard were super efficient, the browser would eventually fall over, so sooner or later we'll need to be able to break up the diffs. I'll take a look at some kind of collapsing or pagination. But my django & python skillz aren't super hot. Thanks.
I've attached a patch that adds pagination to the diff viewer. I cribbed most of the pagination stuff right from the django docs.
-
+
Hm, good idea, but I can't manage to do it. I get the error message "'UploadDiffForm' object has no attribute 'cleaned_data'" I left the base diff path empty, and selected the review board svn repository. Is that right?
Assuming you generated the diff in the base reviewboard directory, you should specify "/trunk" for the base diff path.
Gotcha. The review request is here: http://reviews.review-board.org/r/265/ Unfortunately, paginating the viewer isn't quite enough in our environment. People are submitting 5 megabyte diff files from large merges. What is reviewboard calculating when it brings up the diff viewer? Could it be precalculated and saved once?