Edgewall Software
Modify

Opened 12 years ago

Closed 11 years ago

Last modified 11 years ago

#6127 closed enhancement (duplicate)

Report/Query Pagination Patch

Reported by: Naoki Takezoe Owned by: Matthew Good
Priority: high Milestone:
Component: report system Version: 0.10.4
Severity: normal Keywords: query paginate
Cc: trac-ja@… Branch:
Release Notes:
API Changes:

Description

I'm using Trac in the big project which has a lot of tickets. Trac report displays all tickets at once, so it causes performance problem.

My attached patch (for Trac 0.10.4) contains the following features:

  • report pagination (using SQL "LIMIT x OFFSET y". I think it's best solution for performance)
  • custom query pagination and max displaying limitation

And pagination/limitation parameters configured in trac.ini.

Attachments (2)

report.zip (3.1 KB ) - added by Naoki Takezoe 12 years ago.
Trac-0.11b1_reportpaginate_r412.patch (34.2 KB ) - added by trac-ja@… 11 years ago.
Patch againsts Trac-0.11b1

Download all attachments as: .zip

Change History (11)

by Naoki Takezoe, 12 years ago

Attachment: report.zip added

comment:1 by sid, 12 years ago

See #216 and also http://www.trac-hacks.org/wiki/PaginateTicketsPlugin. Propose to close this as a duplicate. Maybe you can attach your page to #216?

comment:2 by Naoki Takezoe, 12 years ago

PaginatePlugin fetches all ticket data, so it can't solve the performance problem.

#216 milestone is 1.0, but my patch works for 0.10.4 and it also contains custom query improvements. Should I attach to #216?

in reply to:  3 comment:4 by Noah Kantrowitz, 12 years ago

Resolution: duplicate
Status: newclosed

Old release branches are frozen, we only fix bugs, no new features.

comment:5 by sid, 12 years ago

Naoki, yes, I'd recommend attaching your patch to #216. It would also help if the same patch worked with trunk to help its chances of getting merged into the codebase.

comment:6 by Naoki Takezoe, 12 years ago

Thanks. I'll try to port my patch to trunk.

by trac-ja@…, 11 years ago

Patch againsts Trac-0.11b1

comment:7 by trac-ja@…, 11 years ago

Cc: trac-ja@… added
Resolution: duplicate
Status: closedreopened

I port Takezoe's patch to 0.11b1.

  • SQL-level limitation in report and query module.
  • Uses Paginator class partially. (search module has a few diff, too.)
  • Fixes bugs in sortable columns and grouping.

Review it, please.

in reply to:  7 ; comment:8 by Christian Boos, 11 years ago

Keywords: query paginate added
Milestone: 0.12
Priority: normalhigh

Hello, thanks for tackling this issue. Just a quick general note about our stylistic guide: you should really take care of following PEP:0008, in particular the length of the lines which should be kept under 80 characters (see also TracDev/CodingStyle).

Here are a few initial comments:

Replying to trac-ja@i-act.co.jp:

I port Takezoe's patch to 0.11b1.

  • SQL-level limitation in report and query module.

Ok, that's the bulk of the issue. Did you test the SQL changes for SQLite, PostgreSQL (eventually MySQL)?

  • Uses Paginator class partially. (search module has a few diff, too.)

The trac/templates/presentation.html should rather be simply used as an include i.e. without the py:def. See #6374.

  • Fixes bugs in sortable columns and grouping.

Would it be possible to get a separate patch for that? I saw the changes in the unit test, but it wasn't clear what was the bug and the fix.

comment:9 by Christian Boos, 11 years ago

Milestone: 0.12
Resolution: duplicate
Status: reopenedclosed

Oh, and sure you'll hate me, but let's consolidate the discussion about report and query paging support on #216, of course ;-)

in reply to:  8 comment:10 by anonymous, 11 years ago

Thank you cboos for your review. I'll read PEP:0008, TracDev/CodingStyle and #6374.

Replying to cboos:

Replying to trac-ja@i-act.co.jp:

  • Fixes bugs in sortable columns and grouping.

Would it be possible to get a separate patch for that? I saw the changes in the unit test, but it wasn't clear what was the bug and the fix.

When sortable column clicked, sort is done limited subset. This bug is not contain original code, but it exists Takezoe's patch.

And there are no relations between bug fixes and changes in unit test. When I patch query.py (maybe L329-L330), Href returns url query parameters with other order.

We continue to discuss other points in #216. Thank you.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matthew Good.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.