-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LibCore+RS+LibCrypto: Make RS (crash) faster #24313
Conversation
|
21804db
to
e3fbd38
Compare
Hello! One or more of the commit messages in this PR do not match the SerenityOS code submission policy, please check the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The video changes look really nice!
Hit this within seconds when trying to load twitter.com:
|
Built with sanitizers, hit some more errors:
|
Another one:
|
f6fb60c
to
32a5283
Compare
This will invoke the function F only if the provided Condition is met, otherwise the execution of the function F will be further deferred.
Otherwise error events will call into our setup code, eventually leading to a UAF.
Previously sharing a Timer/Notifier between threads (or just handing its ownership to another thread) lead to a crash as they are thread-specific. This commit makes it so we can handle mutation (i.e. just deletion or unregistering) in a thread-safe and lockfree manner.
Previously RS handled all the requests in an event loop, leading to issues with connections being started in the middle of other connections being started (and potentially blowing up the stack), ultimately causing requests to be delayed because of other requests. This commit reworks the way we handle these (specifically starting connections) by first serialising the requests, and then performing them in multiple threads concurrently; which yields a significant loading performance and reliability increase.
This makes galois_multiply() about 10% faster.
Most of IPC::Connection is thread-safe, but the responsiveness timer is very much not so, this commit makes sure only one thread can send stuff through IPC to avoid having threads racing in IPC::Connection. This is simply less work than making sure everything IPC::Connection uses (now and later) is thread-safe.
Continuation of #24265.