Edgewall Software

Ticket #2343 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

max_preview_size isn't active for changeset viewing

Reported by: Dan <trac@…> Owned by: jonas
Priority: normal Milestone: 0.10
Component: version control/changeset view Version: 0.9
Severity: normal Keywords: tracdiff
Cc:

Description

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

Change History

Changed 3 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.

Changed 3 years ago by cboos

  • milestone set to 0.10

See also #2591.

Changed 3 years ago by cboos

  • keywords tracdiff added

Changed 3 years ago by cboos

  • status changed from new to closed
  • resolution set to fixed

The configuration option

[changeset]
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.

Add/Change #2343 (max_preview_size isn't active for changeset viewing)

Author



Change Properties
<Author field>
Action
as closed
Next status will be 'reopened'
 
Note: See TracTickets for help on using tickets.