Skip to content
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

Unnecessary serialization of console events #2641

Open
sadym-chromium opened this issue Sep 20, 2024 · 1 comment
Open

Unnecessary serialization of console events #2641

sadym-chromium opened this issue Sep 20, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@sadym-chromium
Copy link
Collaborator

sadym-chromium commented Sep 20, 2024

Currently, LogManager:

  1. Subscribes to Runtime.consoleAPICalled events
  2. Schedules serialization of the received events.
  3. Puts the serialization promise to the event queue.
  4. EventManager buffers the event and puts the promise to the event queue.

The step 2 requires a CDP call per element in the console message, and can be a massive in case of array with thouthands of elements was loggerd. However, the step 2 is not required until a subscription to the log is added.

@sadym-chromium sadym-chromium added the enhancement New feature or request label Sep 20, 2024
@sadym-chromium
Copy link
Collaborator Author

Proposed solutions:

  1. Rely on http://go/webdriver:bidi-console-api-optimization.
  2. Additionally to Event and PromiseEvent, add a concept of LambdaEvent which will be evaluated only when the event has to be sent to the client. This would allow postponing the serialization till the moment they are really required.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant