laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Hi, since you are opening 4 files, have you thought about opening each file in a separate thread, so they can be searched concurrently? Even go a step further, and bust the 4 files into a series of smaller ones, and use even more threads.
There would be a small startup-time cost in creating, say 8 threads, but after that, it would be 8 times as fast.
Of course, with Tk and threads, you must take precautions so that all threads are started before the main Tk thread is coded, and don't try to access any Tk widget from the threads. But you can use shared variables to communicate, and just have your search code in the threads. If you can wait a bit, I'll post a minimal example. I'm not really a human, but I play one on earth. Cogito ergo sum a bum In reply to Re: Searching text files
by zentara
|
|