Skip to content

improving the perfomance of the process lookup and expanding the deviceBlacklist#1467

Open
mncrftfrcnm wants to merge 4 commits into
SafeExamBrowser:masterfrom
mncrftfrcnm:master
Open

improving the perfomance of the process lookup and expanding the deviceBlacklist#1467
mncrftfrcnm wants to merge 4 commits into
SafeExamBrowser:masterfrom
mncrftfrcnm:master

Conversation

@mncrftfrcnm

Copy link
Copy Markdown

The previously used dictionaries search was not effective, and use some O(n^2) scans

Also added more virtual devices to blacklist

@codecov

codecov Bot commented May 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 52.36%. Comparing base (a95bbac) to head (5320298).
⚠️ Report is 8 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1467      +/-   ##
==========================================
+ Coverage   52.35%   52.36%   +0.01%     
==========================================
  Files         266      266              
  Lines       14560    14562       +2     
  Branches     1600     1598       -2     
==========================================
+ Hits         7623     7626       +3     
  Misses       6634     6634              
+ Partials      303      302       -1     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mncrftfrcnm mncrftfrcnm marked this pull request as draft May 26, 2026 14:08
@mncrftfrcnm mncrftfrcnm marked this pull request as ready for review May 26, 2026 14:09
@dbuechel

dbuechel commented Jun 2, 2026

Copy link
Copy Markdown
Member

Thanks for your contribution, it is much appreciated! We'll review it in the upcoming days and report back here.

@dbuechel dbuechel self-requested a review June 2, 2026 09:47

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

While in theory a correct improvement for large data sets (>100), it is in practice resp. especially here with in almost all use cases less than 10 total windows completely negligible. Thus, please revert the code to its original state.

@dbuechel dbuechel left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you very much for the contribution, it is much appreciated. Please review the comments and provide the additional information resp. changes required, and then we can gladly merge the changes into the master branch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose this improvement has been suggested to you by an AI? And regardless of that, did you actually measure whether your code in practice improves the execution time required for the process monitoring?

If you would have, then you'd realize that for the somewhere around 100 - 300 normally running processes on a Windows machine, this code will often provide no improvement or even a worse performance due to the additionally required allocation of the hash sets vis-à-vis the fail-fast implementation of the LINQ list traversal. Thus again, please revert the code to its original state or then provide clear evidence that the new code is significantly better performing.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you thoroughly tested all of the new devices in the blacklist? We unfortunately had quite a few issues with false-positive detections when we updated resp. added new devices to the blacklist in the past.

@mncrftfrcnm mncrftfrcnm closed this Jun 9, 2026
@dbuechel

Copy link
Copy Markdown
Member

Could you please provide feedback on why you closed the pull request? The improvements in the process factory as well as the device blacklist are perfectly valid and can gladly be merged if so requested.

@mncrftfrcnm mncrftfrcnm reopened this Jun 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants