[Bug 399190] New: ~/.pyhistory every growing
https://bugzilla.novell.com/show_bug.cgi?id=399190 Summary: ~/.pyhistory every growing Product: openSUSE 11.0 Version: Factory Platform: Other OS/Version: Other Status: NEW Severity: Normal Priority: P5 - None Component: Development AssignedTo: pth@novell.com ReportedBy: koenig@linux.de QAContact: qa@suse.de Found By: --- using python interactively creates an every growing history file. when the file gets some 10MB to 100MB size, reading that .pyhistfile significantly slows down pythen startup! this happens because "readline.get_history_length() == -1" by default. here is my simple fix to avoid python slowdowns (even 100k lines is still ok): --- /etc/pythonstart~ 2008-05-31 13:20:20.000000000 +0200 +++ /etc/pythonstart 2008-06-11 10:35:44.000000000 +0200 @@ -13,6 +13,7 @@ # handler for saving history def save_history(historyPath=historyPath): import readline + readline.set_history_length(10000) readline.write_history_file(historyPath) # read history, if it exists it would be great if this small fix would make it into 11.0-GM ?! -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are on the CC list for the bug.
https://bugzilla.novell.com/show_bug.cgi?id=399190
Philipp Thomas
https://bugzilla.novell.com/show_bug.cgi?id=399190
User jmatejek@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=399190#c1
Jan Matejek
https://bugzilla.novell.com/show_bug.cgi?id=399190
User jmatejek@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=399190#c2
--- Comment #2 from Jan Matejek
https://bugzilla.novell.com/show_bug.cgi?id=399190
User jmatejek@novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=399190#c3
Jan Matejek
participants (1)
-
bugzilla_noreply@novell.com