Skip to content

Conversation

CAM-Gerlach
Copy link
Member

Description of Changes

  • Wrote at least one-line docstrings (for any new functions)
  • Added unit test(s) covering the changes (if testable)
  • Included a screenshot or animation (if affecting the UI, see Licecap)

Followup to #25010
Related to #19091

The current default value of the Console buffer size (scrollback length) under Preferences > IPython Console > Interface is very low at only 500 lines, barely a handful of screenfulls of text. Given in 2025 machines can easily handle, and many users expect, far more, and the default setting results in permanent data loss, it seems reasonable to increase it to at least 5000.

Meanwhile, the maximum value was apparently set to only 5000 due to #19091, where a user reported that Spyder was very slugging when the Console buffer size (scrollback length) was set to 50k lines. @ccordoba12 postulated that this could occur with a buffer size >10k lines, and although the maximum was set to half of that still.

However, the setting still allows (and even mentions in the tooltip) a value of -1, which sets the buffer size to unlimited. Given a user desiring a buffer size larger than 5k would have no choice but to set that, which is strictly worse for Spyder's performance than any fixed buffer size, it seems only reasonable to allow a much larger maximum (or none at all); I've set it to 100k for now.

Yet, we should warn users about this more visibility than just a mention in the tooltip. As such, I've implemented a callback on applying a change to this setting that pops up a warning dialog if either >10k lines is set for the buffer, or an unlimited buffer (-1) is set.

Additionally, I've cleaned up a handful of remaining formatting issues not caught in #25010

image

Affirmation

By submitting this Pull Request or typing my (user)name below,
I affirm the Developer Certificate of Origin
with respect to all commits and content included in this PR,
and understand I am releasing the same under Spyder's MIT (Expat) license.

I certify the above statement is true and correct: CAM-Gerlach

Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @CAM-Gerlach for your work on this!

@ccordoba12 ccordoba12 changed the title PR: Increase default+max console buffer, warn if big/unlimited PR: Increase default max console buffer and warn if it's big/unlimited (IPython console) Sep 24, 2025
@CAM-Gerlach CAM-Gerlach force-pushed the console-confpage-increase-buffer branch from 508e8ed to 0416f04 Compare September 24, 2025 22:02
@CAM-Gerlach CAM-Gerlach force-pushed the console-confpage-increase-buffer branch from 0416f04 to 2b3c489 Compare September 24, 2025 22:05
@CAM-Gerlach CAM-Gerlach force-pushed the console-confpage-increase-buffer branch from 2b3c489 to 800b726 Compare September 24, 2025 22:06
Copy link
Member

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, thanks @CAM-Gerlach!

@ccordoba12 ccordoba12 changed the title PR: Increase default max console buffer and warn if it's big/unlimited (IPython console) PR: Increase default max console buffer and warn if it's big (IPython console) Sep 25, 2025
@ccordoba12 ccordoba12 merged commit da6e808 into spyder-ide:master Sep 25, 2025
25 of 26 checks passed
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.

2 participants