@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Allow Maniphest queries to have configurable page sizes

Summary:
Current page size is `1000`. This is nice to have in some cases, but makes pages slower than necessary in others. Task lists are generally dominated by rendering costs.

For example, my default is "recent tasks", which just lists all tasks ordered by date created. Showing 100 tasks here instead of 1000 makes this several times faster without compromising utility.

I don't want to force the default to 100, though, since sometimes listing everything is quite useful and I think an advantage of Maniphest is that it generally deals reasonably well with large task sets.

(This `limit` property is actually read by the default implementation of `getPageSize()` in the parent class.)

Test Plan: Made queries with page sizes 1, 100, 12, 9, 3000, etc.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D6976

+12
+12
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
··· 57 57 $saved->setParameter('createdStart', $request->getStr('createdStart')); 58 58 $saved->setParameter('createdEnd', $request->getStr('createdEnd')); 59 59 60 + $limit = $request->getInt('limit'); 61 + if ($limit > 0) { 62 + $saved->setParameter('limit', $limit); 63 + } 64 + 60 65 return $saved; 61 66 } 62 67 ··· 310 315 pht('Created After'), 311 316 'createdEnd', 312 317 pht('Created Before')); 318 + 319 + $form 320 + ->appendChild( 321 + id(new AphrontFormTextControl()) 322 + ->setName('limit') 323 + ->setLabel(pht('Page Size')) 324 + ->setValue($saved->getParameter('limit', 100))); 313 325 } 314 326 315 327 protected function getURI($path) {