Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Working Set Performance Improvements #9493

Closed
wants to merge 13 commits into from

Conversation

JeffryBooher
Copy link
Contributor

This is for #9439 -- Clicking on items in the working set is slow.

  • Don't create the drag ghost until needed
  • Improve Pane.focus(one big drag was currentElement.blur() so we only need to do that if we're focusing something that isn't code mirror.
  • Improve EditorManager._showEditor(), the UX changes for the pane DOM weren't targeting the right node to see if it needed to re-add the editor to the pane so this was happening every time the editor was shown.
  • Improve _open and _edit to not activate pane until after opening the document

Also fixes #9428

@redmunds redmunds self-assigned this Oct 9, 2014
@JeffryBooher
Copy link
Contributor Author

@redmunds fixed failing unit test. This was also pointing to opening a project and the focus looked like it was in the editor but it really wasn't.

@JeffryBooher JeffryBooher changed the title [TEST ONLY] Working Set Performance Improvements Working Set Performance Improvements Oct 9, 2014
@JeffryBooher
Copy link
Contributor Author

Ready for review.

$ghost.remove();
$el.css("opacity", "");
if (dragged) {
$("#working-set-list-container").removeClass("dragging");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$("#working-set-list-container") is already stored in $workingFilesContainer, so no need for another lookup.

@redmunds
Copy link
Contributor

redmunds commented Oct 9, 2014

Done with code review. Behavior feels solid. All tests pass. Just a few comments.

@JeffryBooher
Copy link
Contributor Author

@redmunds ready for another review

@@ -470,6 +470,7 @@ define(function (require, exports, module) {
* Semi-private: should only be called within this module or by Document.
* @param {!Document} document Document whose main/full Editor to create
* @param {!Pane} pane Pane in which the editor will be hosted
@ @return {!Editor}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: There is a @ instead of *.

@@ -1239,14 +1249,16 @@ define(function (require, exports, module) {
} else {
DocumentManager.getDocumentForPath(file.fullPath)
.done(function (doc) {
_edit(paneId, doc, options);
_edit(paneId, doc, {noPaneActivate: true,
noPaneRedundancyCheck: true});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This call to _edit() ignores the original options object that was passed in. These settings should instead be set on the original options object so that any other settings get passed through. Even if these are currently the only 2 possible options, some new ones might be added some day.

@redmunds
Copy link
Contributor

redmunds commented Oct 9, 2014

Done with review. A few more comments.

@JeffryBooher
Copy link
Contributor Author

@redmunds @TomMalbran thanks for the review! Let me know if it needs any further work before merging

@redmunds
Copy link
Contributor

redmunds commented Oct 9, 2014

@JeffryBooher I just noticed a weird dragging case:

  1. Open in Split View (I'm using Vertical)
  2. Open a few files in upper (Left) working set
  3. Open 12-15 files (enough for a fair amount of scrolling) in lower (Right) working set
  4. Scroll lower working set all the way to bottom
  5. Start dragging last item upward until you hit top of working set...

Results
If you drag fast enough, you can easily drag it to upper working set. If you drag slower, item gets "stuck" in area at top of working set that triggers auto-scrolling. If mouse keeps moving up while item is "stuck" (and list is auto-scrolling), then item is no longer under mouse (but you still have capture)!

@JeffryBooher
Copy link
Contributor Author

Closing in lieu of #9507

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Working Set autoscrolls when it shouldn't
3 participants