Code review comment for lp:~bac/launchpad/bug-436986-team-map

Revision history for this message
Brad Crittenden (bac) wrote :

= Summary =

The bounds method for the map portlet on the team index page times out as it uses all
participants to calculate the bounds. (Bug 436986)

== Proposed fix ==

1) Pass the limit to the model method that calculates the bounds.
2) Create new views for the portlet rather than relying on the ?preview parameter.
The ?preview happens only in the JS call but the view to calculate the bounds was
being used without preview and no limits.

== Pre-implementation notes ==

None

== Implementation details ==

As above.

== Tests ==

bin/test -vv -t team-views.txt -t team-map.txt

== Demo and Q/A ==

Create a huge team (e.g., big-team)and set the location for each member and then
visit https://launchpad.dev/~big-team. Verify that a subset of the members are shown
and the bounds are set appropriately for that subset.

= Launchpad lint =

Checking for conflicts. and issues in doctests and templates.
Running jslint, xmllint, pyflakes, and pylint.
Using normal rules.

Linting changed files:
  lib/lp/registry/browser/configure.zcml
  lib/lp/registry/browser/team.py
  lib/canonical/launchpad/javascript/lp/mapping.js
  lib/lp/registry/browser/tests/team-views.txt
  lib/lp/registry/model/person.py
  lib/lp/registry/stories/location/team-map.txt

== JSLint notices ==
jslint: Lint found in
'/home/bac/canonical/lp-branches/bug-436986-team-map/lib/canonical/launchpad/javascript/bugs/bugtask-index.js':
Line 1382 character 33: Missing semicolon.
        assignee_picker.render()

jslint: No problem found in
'/home/bac/canonical/lp-branches/bug-436986-team-map/lib/canonical/launchpad/javascript/lp/mapping.js'.

jslint: 2 files to lint.

I'll fix this problem before landing.

« Back to merge proposal