Serejah
@serejah
New Member
Joined: Feb 14, 2024
Topics: 34 / Replies: 1221
Reply
RE: Fast search through text file

AD have added some pre/post listener callbacks to the Listener interface. But I have no idea, how to check if the output had thrown an error. Parsing …

2 years ago
Forum
Reply
RE: Fast search through text file

I could only make an app that sends scripts from vscode to selected max instance and not in reverse. Maybe there’s a way to redirect listener output t…

2 years ago
Forum
Reply
RE: Fast search through text file

oh sure, I forgot about that you explicitly limit the count. Then it is kinda strange that allocation of one extra array takes so much time. Cause I d…

2 years ago
Forum
Reply
RE: Fast search through text file

even if the compiler would be smart enough to see that only the first array item is used all the time I doubt that it could optimize the Split method …

2 years ago
Forum
Reply
RE: Fast search through text file

Strangely, I see no difference at all, both trim variants complete at around ~100ms, 26ms is file read If it is the fastest for you, then guess it cou…

2 years ago
Forum
Reply
RE: Fast search through text file

miauu: … but the variables does not start with local or global, so they are not collected. but they either go after the comma , or struct opening…

2 years ago
Forum
Reply
RE: Fast search through text file

looks really good. must be very convenient to use for anyone who is too lazy to switch to vscode or similar. miauu: find a faster way to popu…

2 years ago
Forum
Reply
RE: Fast search through text file

Serejah: perhaps there’s nothing left to optimize shouldn’t have said that denisT: public static string GetFirstWord(string line) nic…

2 years ago
Forum
Reply
RE: Fast search through text file

cool, perhaps there’s nothing left to optimize even the latest .Net 7 version shows 28ms which isn’t far away from 40+ms on my device curious, what i…

2 years ago
Forum
Reply
RE: Fast search through text file

well, I doubt that this test file that you provided is a good test case to ensure that the solution is bug-free. change this line like that and it wi…

2 years ago
Forum
Reply
RE: Fast search through text file

depends on how do you plan to use it. if you’re sure that words that aren’t in the list shouldn’t be collected why adding them? go with the preinitial…

2 years ago
Forum
Reply
RE: Fast search through text file

I still don’t understand why that’s the case, but changing to this solves the issue upd found it at last, was putting index inside parens and not insi…

2 years ago
Forum
Reply
RE: Fast search through text file

don’t do this. instead initialize the dict with known words and add lines info only in case of data.ContainsKey(word) … foreach( var w in words ) d…

2 years ago
Forum
Reply
RE: Fast search through text file

line, lines all around, feel bad at naming things public class Line { public int count; public List<string> lines; public L…

2 years ago
Forum
Reply
RE: Fast search through text file

I didn’t test it in max, but you can call .lines.ToArray() and get the mxs array with all the values If you need line numbers just add another list of…

2 years ago
Forum
Page 3 / 84