wokhan / WFN

Windows Firewall Notifier extends the default Windows embedded firewall by allowing to handle and notify about outgoing connections, offers real time connections monitoring, connections map, bandwidth usage monitoring and more...
GNU General Public License v3.0
603 stars 95 forks source link

resource use / possible fix #135

Open mySYSMON opened 3 years ago

mySYSMON commented 3 years ago

Hi, I used this for the first time today and really respect your beautiful C# code.

Starting chrome seems to pause a bit when WFN is running. I found that setting WFN to a lower CPU priority allows chrome to start a lot faster and WFN seems to work fine running at a lower priority. Note in my case I used taskmanager to set the priority to low. I didn't try "below normal", but in theory below normal should also help. Have you tested this already and found any issues?

static void Main(string[] args)
        {
            Process p = Process.GetCurrentProcess();
            p.PriorityClass = ProcessPriorityClass.BelowNormal;
            Console.WriteLine("Priority is set to: " + p.PriorityClass);
esrat commented 3 years ago

Just my opinion on this topic: Security software like WFN should have precedence before any process-, resource- and network-hugging software like Chrome. Therefor this software has to be implemented in an efficient and robust way, to not waste the given resources. Personally I re-create the task to start Notifier.exe since years now, to set it to the highest starting priority. If it’s done correctly every connection Chrome tries to make which is not covered by a firewall rule yet will be blocked and has to be checked by the user in advance. So WFN needs the highest priority to show blocked-events to the user quickly, so that they "can make Chrome go" for the first time. - In all other cases, when you have all your Chrome-rules in place already, there should only be the Windows Firewall left to manage connections, no WFN to wait for at all.

In General: You should always mention the version you are running. The latest nightly build (20210105) seems to have a bug when Notifier.exe is hoarding CPU cores. That could effect every other process. I haven't seen it with the latest pre-release (2.5 Beta) so far.