Conversation
|
Pinging @elastic/kibana-esql (Team:ESQL) |
|
@elasticmachine merge upstream |
|
I will wait for the CI to get green and review afterwards |
|
@drewdaemon I see 2 tasks in the same PR:
They are not connected as far as I can understand, are they? I wonder if it makes sense to break it into 2 PRs as is a bit difficult to me to understand which are the things necessary to change from the worker removal (also in case of revert we will revert only the worker changes) |
|
/ci |
|
@stratoula point taken—they are connected but not strongly—I should probably not have gone as far as I did with the related cleanup.
You can see just the worker changes in 0a4713e Hopefully that helps... let me know if you still want me to put in the effort to pull these tasks apart. |
stratoula
left a comment
There was a problem hiding this comment.
The commit helped Drew, thanx!
LGTM, I tested it locally and I can't see any performance degradation. (also much simpler code)
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Public APIs missing comments
Async chunks
Page load bundle
Unknown metric groupsAPI count
ESLint disabled in files
References to deprecated APIs
Total ESLint disabled count
History
|
| import { camelCase } from 'lodash'; | ||
| import capitalize from 'lodash/capitalize'; |
There was a problem hiding this comment.
nit: I understand that IDE just reorganized imports
| import { camelCase } from 'lodash'; | |
| import capitalize from 'lodash/capitalize'; | |
| import { camelCase, capitalize } from 'lodash'; |
|
Starting backport for target branches: 8.x https://github.com/elastic/kibana/actions/runs/14474364386 |
💔 All backports failed
Manual backportTo create the backport manually run: Questions ?Please refer to the Backport tool documentation |
💚 All backports created successfully
Note: Successful backport PRs will be merged automatically after passing CI. Questions ?Please refer to the Backport tool documentation |
## Summary Fix elastic#217923 Investigations in elastic#217368 showed that there was basically no performance impact to passing the AST across a thread boundary. But we also didn't detect a pressing reason to remove the worker. Since then, however, we noticed another cost associated with the worker: it's a hefty Javascript file, even in production builds. In addition, we are doing parsing on the main thread _and_ the worker, so the `kbn-esql-ast` package is actually being loaded and parsed twice by the browser, once for the main thread and once for the worker. This PR removes our worker. Our parsing associated with validation and autocomplete will still be done asynchronously, but on the main thread. I do not see any regression in perceived performance. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> (cherry picked from commit 9b4403b) # Conflicts: # src/platform/packages/shared/kbn-monaco/src/esql/language.ts # src/platform/packages/shared/kbn-monaco/src/esql/lib/converters/suggestions.ts # src/platform/packages/shared/kbn-monaco/src/esql/lib/esql_ast_provider.ts # src/platform/packages/shared/kbn-monaco/src/esql/lib/signature/index.ts # src/platform/packages/shared/kbn-monaco/src/esql/lib/types.ts # src/platform/packages/shared/kbn-monaco/src/esql/worker/esql.worker.ts # src/platform/packages/shared/kbn-monaco/src/esql/worker/esql_worker.ts # src/platform/packages/shared/kbn-monaco/src/register_globals.ts # src/platform/packages/shared/kbn-monaco/webpack.config.js
# Backport This will backport the following commits from `main` to `8.x`: - [[ES|QL] remove worker (#218006)](#218006) <!--- Backport version: 9.6.6 --> ### Questions ? Please refer to the [Backport tool documentation](https://github.com/sorenlouv/backport) <!--BACKPORT [{"author":{"name":"Drew Tate","email":"drew.tate@elastic.co"},"sourceCommit":{"committedDate":"2025-04-15T16:18:07Z","message":"[ES|QL] remove worker (#218006)\n\n## Summary\n\nFix https://github.com/elastic/kibana/issues/217923\n\nInvestigations in #217368 showed\nthat there was basically no performance impact to passing the AST across\na thread boundary. But we also didn't detect a pressing reason to remove\nthe worker.\n\nSince then, however, we noticed another cost associated with the worker:\nit's a hefty Javascript file, even in production builds. In addition, we\nare doing parsing on the main thread _and_ the worker, so the\n`kbn-esql-ast` package is actually being loaded and parsed twice by the\nbrowser, once for the main thread and once for the worker.\n\nThis PR removes our worker. Our parsing associated with validation and\nautocomplete will still be done asynchronously, but on the main thread.\n\nI do not see any regression in perceived performance.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"9b4403b7dc867de1db520e1f9e8ed07f22f41784","branchLabelMapping":{"^v9.1.0$":"main","^v8.19.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","Feature:ES|QL","Team:ESQL","backport:version","v9.1.0","v8.19.0"],"title":"[ES|QL] remove worker","number":218006,"url":"https://github.com/elastic/kibana/pull/218006","mergeCommit":{"message":"[ES|QL] remove worker (#218006)\n\n## Summary\n\nFix https://github.com/elastic/kibana/issues/217923\n\nInvestigations in #217368 showed\nthat there was basically no performance impact to passing the AST across\na thread boundary. But we also didn't detect a pressing reason to remove\nthe worker.\n\nSince then, however, we noticed another cost associated with the worker:\nit's a hefty Javascript file, even in production builds. In addition, we\nare doing parsing on the main thread _and_ the worker, so the\n`kbn-esql-ast` package is actually being loaded and parsed twice by the\nbrowser, once for the main thread and once for the worker.\n\nThis PR removes our worker. Our parsing associated with validation and\nautocomplete will still be done asynchronously, but on the main thread.\n\nI do not see any regression in perceived performance.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"9b4403b7dc867de1db520e1f9e8ed07f22f41784"}},"sourceBranch":"main","suggestedTargetBranches":["8.x"],"targetPullRequestStates":[{"branch":"main","label":"v9.1.0","branchLabelMappingKey":"^v9.1.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/218006","number":218006,"mergeCommit":{"message":"[ES|QL] remove worker (#218006)\n\n## Summary\n\nFix https://github.com/elastic/kibana/issues/217923\n\nInvestigations in #217368 showed\nthat there was basically no performance impact to passing the AST across\na thread boundary. But we also didn't detect a pressing reason to remove\nthe worker.\n\nSince then, however, we noticed another cost associated with the worker:\nit's a hefty Javascript file, even in production builds. In addition, we\nare doing parsing on the main thread _and_ the worker, so the\n`kbn-esql-ast` package is actually being loaded and parsed twice by the\nbrowser, once for the main thread and once for the worker.\n\nThis PR removes our worker. Our parsing associated with validation and\nautocomplete will still be done asynchronously, but on the main thread.\n\nI do not see any regression in perceived performance.\n\n---------\n\nCo-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>\nCo-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com>\nCo-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co>","sha":"9b4403b7dc867de1db520e1f9e8ed07f22f41784"}},{"branch":"8.x","label":"v8.19.0","branchLabelMappingKey":"^v8.19.0$","isSourceBranch":false,"state":"NOT_CREATED"}]}] BACKPORT-->
Fix elastic#217923 Investigations in elastic#217368 showed that there was basically no performance impact to passing the AST across a thread boundary. But we also didn't detect a pressing reason to remove the worker. Since then, however, we noticed another cost associated with the worker: it's a hefty Javascript file, even in production builds. In addition, we are doing parsing on the main thread _and_ the worker, so the `kbn-esql-ast` package is actually being loaded and parsed twice by the browser, once for the main thread and once for the worker. This PR removes our worker. Our parsing associated with validation and autocomplete will still be done asynchronously, but on the main thread. I do not see any regression in perceived performance. --------- Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com> Co-authored-by: Elastic Machine <elasticmachine@users.noreply.github.com> Co-authored-by: Stratoula Kalafateli <efstratia.kalafateli@elastic.co> (cherry picked from commit 9b4403b)
Summary
Fix #217923
Investigations in #217368 showed that there was basically no performance impact to passing the AST across a thread boundary. But we also didn't detect a pressing reason to remove the worker.
Since then, however, we noticed another cost associated with the worker: it's a hefty Javascript file, even in production builds. In addition, we are doing parsing on the main thread and the worker, so the
kbn-esql-astpackage is actually being loaded and parsed twice by the browser, once for the main thread and once for the worker.This PR removes our worker. Our parsing associated with validation and autocomplete will still be done asynchronously, but on the main thread.
I do not see any regression in perceived performance.