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

Add performance and caching tests for stdout/stderr #138

Draft
wants to merge 17 commits into
base: main
Choose a base branch
from

Conversation

krassowski
Copy link
Owner

@krassowski krassowski commented Nov 19, 2024

References

Code changes

Adds caching for results on the linkify method which is the most expensive step of rendering large errors and standard outputs.

User-facing changes

Faster stdout

Iterations Before After
1000 4s 3s
2000 18s 8s
3000 42s 22s
4000 1min 23s 41s
import sys

for i in range(4000):
    print(f"example.com {i} XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX www.", end='')
    sys.stdout.flush()

Faster stderr

Iterations Before After
1000 2s 1s
2000 7s 3s
3000 16s 7s
4000 30s 13s
import logging

logger = logging.getLogger()

for i in range(4000):
    logger.error(f"{i} XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX")

I had to increase --ServerApp.iopub_msg_rate_limit to 10000 as the stream was faster than jupyter-server was allowing for ("IOPub message rate exceeded").

Backwards-incompatible changes

krassowski and others added 16 commits November 19, 2024 17:27
…lab#16852)

* Run CI on Python 3.9 and 3.13 (drop 3.8 from testing matrix)

* Bump `setuptools` to fix minimum versions test.

For reference it was:
      The conflict is caused by:
          The user requested setuptools>=40.8.0
          The user requested (constraint) setuptools==40.1.0

* Try `setuptools>=40.9.0`

* Setuptools 41.1.0 is minimum that works with Python 3.9

See https://github.com/pypa/setuptools/blob/e622859e278e1751175ded6f8f41ea3de06e4855/NEWS.rst#v4110
* Revert "Alternate description for disabled filters"

This reverts commit 059fb7e.

* Revert "Revert "Alternate description for disabled filters""

This reverts commit 27ed1d0.

* Diminishes border color when dragging multiple cells

---------

Co-authored-by: Jeremy Tuloup <[email protected]>
…g `RTC:`) (jupyterlab#16988)

* Fix FileBrowserModel.onFileChanged

* Fix

* Add back prefix before comparing paths

* Add test
* Fix handling of carriage return in output streams

* Lint
* Bump httpx v0.28.0

* Use `~=` for httpx

---------

Co-authored-by: Michał Krassowski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants