-
Notifications
You must be signed in to change notification settings - Fork 236
Renovate PowerShellEditorServices #720
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
TestingThe tests for EditorServices have fallen behind a bit, and the existing ones are a bit flaky. The tests are all pretty monolithic. So here are my ideas there:
|
Project Code LayoutEditorServices has gotten more complex as time has gotten on and is probably due for a restructuring to manage the complexity. Naturally we can't change the whole project's architecture, but it might be possible to work out what we think we should have and then work out how we gradually migrate to that. Base projects
Features and Components
Consolidate components
|
Request HandlingCurrently request handling is sometimes done by a component/feature but a lot of the time by Instead, requests should probably be handled individually by registered request handlers that follow an interface (like This interface would probably have a single A request handler object would then be able to take a This might not be an efficient thing to do (compared to handler methods), but we should in any case find a way to silo relevant request handling code. This would help with thread safety as well. |
BenchmarkingSince performance is currently an issue for EditorServices, we should invest in some performance benchmarking infrastructure/tests so that we can identify performance regressions. This would live under the testing code, and likely be extra instrumentation on existing tests, written in a low-overhead, general way, so that any test can be (or is automatically) instrumented with performance trackers. We would also need specifically written standalone benchmarks of common usages, such as:
|
Caching and LazinessWe currently do a little bit of caching, plus some cleverness for incremental edits for script files, but there are still more opportunities for caching and lazy operations.
In any event, we should be caching the following:
We should also try to have some logic to only perform operations in the windows that have focus. |
Implementing a handler for CancelRequestA possibly large win for us would be implementing a All our handlers are currently asynchronous, and many support a cancellation token. But we would need to make the following changes:
|
/cc @joeyaiello, @tylerl0706, @rkeithhill, @SeeminglyScience |
Spoke to @rjmholt offline about this. Totally a great collection of things that could be better. The first one we think is worth tackling in the request handling. If we tear down the monolithic approach to handling messages by replacing it with classes that are made to handle single messages, we can more easily write unit tests for this. This means that after this work is done, we focus on tests! We can add unit tests for each request, and refresh our current integration/functional tests. While implementing the request handling, we can use that as an opportunity to implement better cancellation logic for when we (finally) get to handling cancelRequest. |
With the performance issues that are affecting EditorServices, some of the code getting fairly spidery and hard to maintain, and various test/build obsolescence issues, we should probably contemplate an ongoing effort to revitalise the codebase.
This issue is intended as a starting point for design discussions/suggestions to make EditorServices more manageable, more efficient and possibly more configurable. (With main emphasis on restoring performance and stability).
So just comment with any ideas or thoughts you've got.
Anything we generally agree on can be spun out into its own issue for work.
The text was updated successfully, but these errors were encountered: