Edgewall Software

Opened 12 years ago

Closed 12 years ago

#2343 closed defect (fixed)

max_preview_size isn't active for changeset viewing

Reported by: Dan <trac@…> Owned by: Jonas Borgström
Priority: normal Milestone: 0.10
Component: version control/changeset view Version: 0.9
Severity: normal Keywords: tracdiff
Release Notes:
API Changes:


I'm not sure if this is a defect, or if it's intended, but I have a very large text file (it's test input data) in my repository. When I attempt to view it in the browser, I correctly get a message that the file size is too large to preview. However, when I try to view a changeset regarding this file, Apache just goes away to contemplate its navel, and meanwhile access to the site is non-existent. I have never waited long enough to view the final results.

Maybe max_preview_size should control the changeset view as well, or maybe there should be another variable. I realize that the "difference" may be much smaller than the total file, but in this case, it is causing a lot of grief.

I think that a work-around might be to change the mime-type of the file in the repository, but I haven't tried that yet. Maybe then Trac won't try to do anything with the file in the changeset view.

If it matters, I am using Apache 2.0.52, Python 2.4.2 with mod_python, under Windows x64.

Attachments (0)

Change History (4)

comment:1 Changed 12 years ago by anonymous

This is not only a problem for apache spending a lot of time sending out the changeset page but also for the browser to actually display the page. I've crashed firefox a few times (the process was using all available memory trying to display the big HTML page).

This can also arise in case of important changes to a lot of different files. In that case, a paging solution could be helpful, having a next button to see the next diff.

comment:2 Changed 12 years ago by Christian Boos

Milestone: 0.10

See also #2591.

comment:3 Changed 12 years ago by Christian Boos

Keywords: tracdiff added

comment:4 Changed 12 years ago by Christian Boos

Resolution: fixed
Status: newclosed

The configuration option

max_diff_bytes = 20000000

added in r2968 can be used for that.

Note that the above number is a limit for the sum of the size of all old and new files involved in a changeset.

Therefore, a limit of 20Mb actually correspond to the possibility of showing diffs for, e.g. 10 modified files of 1Mb each.

Note also that when requesting a diff precisely on a very big file (e.g. by the use of the Last Change link), the size limit will not be taken into account and the diffs will always be computed.

Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Jonas Borgström.
The resolution will be deleted.
to The owner will be changed from Jonas Borgström to the specified user.

Add Comment

E-mail address and name can be saved in the Preferences .

Note: See TracTickets for help on using tickets.