[Chennaipy] Reduce the search time on a huge text file
Thirunarayanan Srinivasan
tstnarayan at gmail.com
Thu Jun 24 00:11:02 EDT 2021
Hi,
Can you try using mmap. See the link below for more information.
Regards,
Thiru
https://docs.python.org/3/library/mmap.html
On Thu, 24 Jun 2021 at 6:22 AM Saravanan Muthuramalingam <
saravana4285 at gmail.com> wrote:
> Hello Abirami ,
>
> I'm presuming your doing search in python by reading text file which is
> big in size ?, if yes then give it a try with while loop and yield , so
> that you can load portion or batches of data into memory and do search
> operation , thanks
>
> Saravanan Muthuramalingam
>
> On Wed, 23 Jun 2021, 13:48 Abirami Moorthy, <mabirami8799 at gmail.com>
> wrote:
>
>> Hello, I'm tried to search the words from text file this having 25lakhs
>> above word. It's take long time to progress. Kindly share ways to find the
>> words in 1min maximum.
>>
>>
>>
>> Regards,
>> M.Abirami
>>
>> _______________________________________________
>> Chennaipy mailing list
>> Chennaipy at python.org
>> https://mail.python.org/mailman/listinfo/chennaipy
>>
> _______________________________________________
> Chennaipy mailing list
> Chennaipy at python.org
> https://mail.python.org/mailman/listinfo/chennaipy
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/chennaipy/attachments/20210624/69f6e225/attachment.html>
More information about the Chennaipy
mailing list