PDA

View Full Version : Seach in files.



phvwijk
24-Jun-2020, 01:00 PM
I have problem when I use find in files.

It stops on one of the files a pretty long time (25+ seconds), Set the studio to not responding in the task manager.
Utilization at that moment is a 100% on one of the cores. After that the search continues and I get the proper results.

Looks like something is not going well. Does more people have that problem?
According to the search progress information is is working on the sources Dates.nui. did look at the source but do not see anything "special".


Peter

Garret Mott
24-Jun-2020, 02:20 PM
Hi Peter -

I've seen Find in Files "pause" for a while - but never that I can remember on Dates.nui or any of Sture's other files.

I figured that it was having to catch its breath... ;) Actually, maybe it has to write to disk every so often? It does write to [username]_findinfiles.dsk. It's plain text.

phvwijk
24-Jun-2020, 03:22 PM
In 19.1 no problems. Same sources.

Peter

Stephen W. Meeley
24-Jun-2020, 03:45 PM
Peter,

Garret is right that if the Studio doesn't see the file extension as being known it will slow down significantly. Make sure that in the 20 Studio you have all the same extensions registered as in 19.1.

Garret Mott
24-Jun-2020, 05:14 PM
Well - I didn't know that - but thanks for the credit! :)

I have *.nui & *.utl registered in all my workspaces - so that could explain things.

phvwijk
24-Jun-2020, 07:24 PM
Yep I did not register them. Do not understand why this would be a problem. Just doing a search through some text ?

Peter

Harm Wibier
25-Jun-2020, 01:04 PM
Because of character conversions. As most searches are case insensitive it can't just do a binary comparison, but it has to properly interpret the characters in the string. That means that it needs to do the proper conversions (look at the BOM to see if it is UTF-8 or if it should do an OEM to UTF-8 conversion), and for files it does not recognize as DataFlex files it has to make an assumption on what it is. For non DataFlex files it will now assumes UTF-8 which means it doesn't do conversions. OEM files with non ASCII characters are unfortunately not compatible with UTF-8 and this malformed UTF-8 data causes the search to slow down.

phvwijk
26-Jun-2020, 06:20 AM
Thanks, clear. Can understand the default choice that a non dataflex file is UTF-8. But is most cases it will not be UTF-8.
Ask myself how Notepad++ is doing that. It is working fast again so it is ok for me.

Peter