Bug 511066 - Investigate running tooling more often (so that people see errors when auto-save is not enabled)
Summary: Investigate running tooling more often (so that people see errors when auto-s...
Status: RESOLVED FIXED
Alias: None
Product: Orion (Archived)
Classification: ECD
Component: JS Tools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P2 normal (vote)
Target Milestone: 14.0   Edit
Assignee: Curtis Windatt CLA
QA Contact:
URL:
Whiteboard: 2017-02-24
Keywords: noteworthy
Depends on:
Blocks:
 
Reported: 2017-01-25 16:27 EST by Steve Northover CLA
Modified: 2017-02-13 14:36 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Northover CLA 2017-01-25 16:27:50 EST
It is confusing that you don't see errors right away as you type.  What ever the frequency for auto-save, that is likely good for tooling (maybe).

Perhaps it only makes sense to run the syntax checker or a subset.  Needs investigation.
Comment 1 Curtis Windatt CLA 2017-01-30 17:54:06 EST
I set up an example that will perform syntax every 500 ms if autosave is off.  It works well on small files, but constantly running the operation on a large file is more painful.  I will have to implement an isSyntaxCheckDirty flag or something to skip the operation if the editor hasn't been modified.
Comment 2 Steve Northover CLA 2017-01-30 18:06:46 EST
When auto-save is on, the tooling is running constantly.  Is that correct?  There doesn't seem to be a performance problem there so we should do the same sort of thing (which likely involves the flag you mentioned).
Comment 3 Curtis Windatt CLA 2017-01-31 10:18:04 EST
(In reply to Steve Northover from comment #2)
> When auto-save is on, the tooling is running constantly.  Is that correct? 
> There doesn't seem to be a performance problem there so we should do the
> same sort of thing (which likely involves the flag you mentioned).

The tooling only runs when a save actually happens.  So if you stop editing the file, the tooling stops running.  Right now in my example the chrome tab is constantly running linting because there is no way to know whether the file has been edited since the last lint (so CPU stuck at 15%).  Yes this secondary isDirty flag would solve this issue.
Comment 4 Steve Northover CLA 2017-01-31 12:06:12 EST
Sorry I didn't say that right.  What I was getting at was we run the tooling every time there is a save.  Auto-save happens at some interval and the tooling is not bad or slow.  Therefore, I have hope that we can do the "same thing, without the save".
Comment 5 Curtis Windatt CLA 2017-01-31 12:30:15 EST
http://git.eclipse.org/c/orion/org.eclipse.orion.client.git/commit/?id=65be9b666945c429fff43419ed0d38ebe6f788d8
Fixed in master

When the editor loads, if autosave is turned OFF I set an auto syntax check with 250ms timeout.  The auto check uses a flag to see if the editor has been modified since the last syntax check.  The auto check timeout is hard coded.