history /r very slow

Jun 5, 2015
12
0
#1
I like to restore old history in new sessions using command "History /R %_HLOGFILE" in tcstart.btm.
Recently I have increased history size to to 500k in order to keep a larger history and noticed that history /r is strangely slow.
To read a 500k history file (which contains about 20k lines and e.g. "type %_HLOGFILE" can show in less than 0.1s), "history /r" takes over 20s to load it.
This is using tcc/le 14.0.0.9 x64

Regards
libit
 
Jun 5, 2015
12
0
#3
Exactly same time.
Note that I've "Copy to end" ON and Duplicates OFF...so there should be no time wasted looking for previous duplicates.
I'm also seeing some unexpected behaviors if I specify a History File in the OPTION dialog, so I'll need to go back to explicitly load/save history from tcstart/tcexit.btm
 
Jun 5, 2015
12
0
#4
One side effect of using an History File (entry in OPTION settings) is the following:
1 I'm using global history list
2 I launch first tcc instance
3 tcc reads history from file
4 I type a few commands
5 I launch a second tcc instance
6 second instance reads history file again (bug?, when using a global list this should be skipped in my opinion)
7 by reading the history file again, commands typed at step 4 are lost or shifted to much up in the history

Is there any way, in TCC/LE, to detect (in a btm file) if current tcc instance is the first/only one or there are other running instances? So I can read history from tcstart only for the fist instance.
Alternatively, is there any way to detect if the history is empty?
 
Jun 5, 2015
12
0
#6
Given that I'm trying to keep a 500K history, that execstr doesn't seem such a good idea to me. And history /tn is not available in tcc/le.
So let's consider this a bug report both for the crawl-like loading speed of the history from file, and also for the fact that starting a second shell with global history shoudln't reload the history at all (when a History File is specified in History->Command line)....and,btw, when closing a secondary shell shouldn't save the history either....