there is also a possible value of -1 , for unlimited i had once a ~3mb or ~7mb file cause some bug .. and it took ( too ) long to load
greets On Tue, Feb 6, 2024, 05:07 Casey Johnson <stry...@hotmail.com> wrote: > That is more or less how I happened upon this behavior. I have been using > bash for 20+ years and for most of that time I have had HISTSIZE and > HISTFILESIZE large enough to be effectively unlimited. I recently took the > time to learn the difference between HISTSIZE and HISTFILESIZE. I liked the > idea of having a perpetual history (unlimited HISTFILESIZE) but only > keeping the most recent entries in memory by default, since those are the > most likely ones I would want to reuse. If I really want to mine the old > entries on occasion, I can always bump up HISTSIZE and load the whole file. > I think I started with something like HISTSIZE=25000 and was surprised by > how long new terminals took to produce the first prompt. I started playing > around with different values and it wasn't hard to guess that there was a > whole lot of memmove() (or similar) happening. > ------------------------------ > *From:* alex xmb sw ratchev <fxmb...@gmail.com> > *Sent:* Monday, February 5, 2024 7:29 PM > *To:* Dale R. Worley <wor...@alum.mit.edu> > *Cc:* Casey Johnson <stry...@hotmail.com>; bug-bash <bug-bash@gnu.org> > *Subject:* Re: Slow history load with some values of HISTSIZE > > > > On Mon, Feb 5, 2024, 18:09 Dale R. Worley <wor...@alum.mit.edu> wrote: > > Casey Johnson <stry...@hotmail.com> writes: > > In a clean shell, execute: > > HISTFILE=alt-history.txt > > HISTSIZE=150000 > > history -r > > and then observe how long the last command runs before returning. > > Though I expect that when you exit bash, the history file gets trimmed > to 150,000 lines, and then the "over 10 seconds to load" doesn't happen > again. > > > there is another HISTFILESIZE var > maybe .. > > Dale > >