ghostop14 / sparrow-wifi

Next-Gen GUI-based WiFi and Bluetooth Analyzer for Linux
GNU General Public License v3.0
1.24k stars 156 forks source link

Speed enhancements #63

Open stryngs opened 3 years ago

stryngs commented 3 years ago

This PR serves to deal with regex and how iw is used. At some point I aim to PR a full scapy functionality, but for now I need to learn how this repo works and so I'm eyeballing and shooting from the hip on general patches that can be done in the name of speed.

Before this patch re.compile() was called everytime that iw would scan. This patch removes that and makes it compile only once, saving cycles.

Testing shows that the threads are safe and the GUI updates as expected.

stryngs commented 3 years ago

It would appear that my editor has removed spaces on blank lines. It makes the diff hard to read, apologies for that...

ghostop14 commented 3 years ago

Hi stryngs, thanks for the PR. Looks good, except with the addition of the requirements.txt file I wonder if == on the versions could break installs on some systems? Maybe we separate out the requirements.txt PR from the other changes?

stryngs commented 3 years ago

Hi stryngs, thanks for the PR. Looks good, except with the addition of the requirements.txt file I wonder if == on the versions could break installs on some systems? Maybe we separate out the requirements.txt PR from the other changes?

Hi @ghostop14 -- You can remove the == if you just want pip to grab the newest version and not be tied to a specific one. It is more for a 100% approach with regards to knowing that X packages with version Y allow a successful program run.

I think >= works as well, but have never used.

the-j0k3r commented 2 years ago

It would appear that my editor has removed spaces on blank lines. It makes the diff hard to read, apologies for that...

GitHub has a hide whitespace changes feature. adding &w=1 to link or

https://github.com/ghostop14/sparrow-wifi/pull/63/files?diff=unified&w=1