Use threading to cache classes in the background #2

Closed
opened 2 years ago by hugo · 4 comments
hugo commented 2 years ago
Owner

Use collaborative threading to parse through a queue of classes in the background to implement eager parsing of method return types.

Use collaborative threading to parse through a queue of classes in the background to implement eager parsing of method return types.
hugo commented 2 years ago
Poster
Owner

Pushed initial implementation: 341afd42da

There seem to still be small lock ups, but it's not nearly as bad as things were. Will have to use this implementation in the wild for a while to see if more improvements can be made.

Pushed initial implementation: https://git.snorba.art/hugo/phpinspect.el/commit/341afd42da277c71b151564034c2d5f55961159f There seem to still be small lock ups, but it's not nearly as bad as things were. Will have to use this implementation in the wild for a while to see if more improvements can be made.
hugo added the
Beta Feature
label 2 years ago
hugo self-assigned this 2 years ago
hugo commented 2 years ago
Poster
Owner

Pushed changes that make the index thread block and wait for new tasks when the queue is empty: a2ce841555

Thread is woken up by a dedicated error signal upon enqueuement of a new task.

Pushed changes that make the index thread block and wait for new tasks when the queue is empty: https://git.snorba.art/hugo/phpinspect.el/commit/a2ce841555f0deb06167a75bb7871f0e9e5cdd73 Thread is woken up by a dedicated error signal upon enqueuement of a new task.
hugo commented 2 years ago
Poster
Owner

Pushed changes that aim to index all types in a buffer ahead of time: c0786db131

Tasks for (hopefully) all types that are used/imported in an opened buffer are now added to the index task queue by the after-save-action.

Pushed changes that aim to index all types in a buffer ahead of time: https://git.snorba.art/hugo/phpinspect.el/commit/c0786db131636797295cd9c61d72485b162665fe Tasks for (hopefully) all types that are used/imported in an opened buffer are now added to the index task queue by the `after-save-action`.
hugo added this to the Ready for fieldtesting milestone 2 years ago
hugo commented 9 months ago
Poster
Owner

With the addition of asynchronous file contents insertion when possible and other (1, 2) improvements to worker thread behavior, this feature now seems stable/usable enough for others to tryout.

With the addition of [asynchronous file contents insertion](https://git.snorba.art/hugo/phpinspect.el/commit/f9f3440850519e0366c1307ea6cffc4fb2f7b6da) when possible and other ([1](https://git.snorba.art/hugo/phpinspect.el/commit/0e00d7e5a6952656d3109484b9deee00d9753ae6), [2](https://git.snorba.art/hugo/phpinspect.el/3838e02820e7435534bdf3e4408ba7176b62981f)) improvements to worker thread behavior, this feature now seems stable/usable enough for others to tryout.
hugo closed this issue 9 months ago
Sign in to join this conversation.
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: hugo/phpinspect.el#2
Loading…
There is no content yet.