Closed Bug 610271 Opened 9 years ago Closed 7 years ago

Refactor and simplify snapping system

Categories

(Firefox Graveyard :: Panorama, defect, P3)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX
Future

People

(Reporter: mitcho, Unassigned)

References

Details

(Keywords: perf, Whiteboard: [qa-])

Back when I wrote the original Panorama snapping system ("trenches"), it was written as a pretty general system which could do things like, for example, have arbitrary snapping regions ("trenches") which weren't actually associated with any item.

Some things which can disappear:
- the ability to show debug trench regions
- per-trench snapping radii settings
- the array of border trenches. Right now we keep a collection of border trench objects (one per edge of each item) and continuously update their locations when their associated Item is repositioned. When we move some item, we check if each of *its* edges would overlap with any of the other border trenches. Instead, we could simply check if the being-dragged item is "close" to any other top-level items... this would reduce the number of Rect.intersect calls for border trenches by a factor of four. [Note: all of this is about border trenches, not guide trenches (the long-distance alignment ones) which we do definitely need trenches for.]

Adding a hidden about:config pref to completely disable this system may also be welcome by some.

I'm going to mark this as perf as there are potential performance benefits, particularly in the area of dragging things around when there are lots of items, which can be a little jittery at times.
Blocks: 615578
Assignee: nobody → mitcho
Keywords: perf
Whiteboard: [perf][qa-] → [qa-]
Blocks: 604213
It's too late in the Fx4 cycle for this kind of work.
Target Milestone: --- → Future
Blocks: 628107
Assignee: mitcho → nobody
We're not going to address this with Panorama being slated for removal.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WONTFIX
Product: Firefox → Firefox Graveyard
You need to log in before you can comment on or make changes to this bug.