Bug 513586 - Navigation to a sub-project does not reset the tools
Summary: Navigation to a sub-project does not reset the tools
Status: CLOSED WONTFIX
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: 13.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Michael Rennie CLA
QA Contact:
URL:
Whiteboard:
Keywords: performance
Depends on:
Blocks:
 
Reported: 2017-03-13 13:05 EDT by Michael Rennie CLA
Modified: 2018-04-09 09:37 EDT (History)
3 users (show)

See Also:
Silenio_Quarti: review+
curtis.windatt.public: review+
steve_northover: review+


Attachments
proposed fix (881 bytes, patch)
2017-03-13 13:51 EDT, Michael Rennie CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Rennie CLA 2017-03-13 13:05:09 EDT
Steps:

1. open astManager.js (in the orion.client code)
2. the project context is computed as the orion.client folder (GOOD)
3. now open server.js in the orionode folder
4. the tools still thinks the project context is the orion.client folder because it is a sub-folder within the same project

This behaviour is by design - we don't want to be computing the project every time we change files (possible performance issues), but we do have to support navigating into sub-projects (making sure we in fact switch contexts).
Comment 1 Michael Rennie CLA 2017-03-13 13:51:01 EDT
Created attachment 267234 [details]
proposed fix

This allows the tools to reset when navigating into a sub-project
Comment 2 Curtis Windatt CLA 2017-03-13 17:09:35 EDT
Works for the prescribed steps, +1 for 14.0.
Comment 3 Michael Rennie CLA 2017-03-13 17:45:34 EDT
Pushed fix to:

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=8d4a600d3e1d130fde7864f837eb22e443901b0c

I'm going to leave this open until we can spend time testing a deployed version to ensure there are no performance issues.
Comment 4 Michael Rennie CLA 2017-03-14 17:02:46 EDT
As I feared, if you navigate around a lot of files the tools get laggy - we cannot simply ask for the project every time we open a file.

I reverted the fix for 14.0, we cannot introduce a performance regression.

http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=ffe2aa932ed4be8e7e287733015e02930b7be311
Comment 5 Michael Rennie CLA 2017-05-12 16:06:54 EDT
(In reply to Michael Rennie from comment #4)
> As I feared, if you navigate around a lot of files the tools get laggy - we
> cannot simply ask for the project every time we open a file.
> 
> I reverted the fix for 14.0, we cannot introduce a performance regression.
> 
> http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/
> ?id=ffe2aa932ed4be8e7e287733015e02930b7be311

No matter what I have tried the performance remains bad having to re-resolve the project constantly.
Comment 6 Steve Northover CLA 2017-05-12 16:30:53 EDT
I believe you but I find it incredible.  On every mouse click, you go up the file tree doing an ls on each level, looking for files that have a certain name/pattern.  I could understand if you a billion levels deep in the tree.

Ok, let's defer this.  It mean that "project anywhere" won't work.
Comment 7 Michael Rennie CLA 2017-05-15 09:33:55 EDT
(In reply to Steve Northover from comment #6)
> I believe you but I find it incredible.  On every mouse click, you go up the
> file tree doing an ls on each level, looking for files that have a certain
> name/pattern.  I could understand if you a billion levels deep in the tree.
> 
> Ok, let's defer this.  It mean that "project anywhere" won't work.

Project anywhere works fine - its project inside another project that does not work correctly - and it only "fails" when you have loaded the enclosing project context first.
Comment 8 Steve Northover CLA 2017-05-17 11:16:41 EDT
I'd like to understand the cases where it fails and works and ensure that there is no intermittent behaviour.  In general, I would prefer that a limited set of cases work every time rather than things work sometime.
Comment 9 Michael Rennie CLA 2018-04-09 09:37:57 EDT
Closing as part of a mass clean up of inactive bugs. Please reopen if this problem still occurs or is relevant to you. 

For more details see: https://dev.eclipse.org/mhonarc/lists/orion-dev/msg04114.html