Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@knocte
Copy link
Contributor

@knocte knocte commented Aug 2, 2013

Create on demand up to min_threads to avoid startup penalty, avoiding
throttling of threadpool worker thread creation (for now, using
a --server flag) at initialization.

When throttling happens, operations such as parallel https requests were
slowed down significantly due to all of the threads created in order
to complete the SSL operations.

Based on @kamalaboulhosn's pull request (#640), addressing Miguel's comment.

(Tried putting the gboolean variable in mini.c/mini.h, but this didn't work, as it would cause this compilation error:
make[3]: Entering directory /home/knocte/Documents/Code/mymono/mono/metadata' CC libmonoruntime_la-mono-config.lo CC libmonoruntime_la-threadpool.lo In file included from threadpool.c:22:0: ../../mono/mini/mini.h:52:2: error: #error "The code in mini/ should not depend on these defines." make[3]: *** [libmonoruntime_la-threadpool.lo] Error 1 make[3]: Leaving directory/home/knocte/Documents/Code/mymono/mono/metadata'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory /home/knocte/Documents/Code/mymono/mono' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory/home/knocte/Documents/Code/mymono'
make: *** [all] Error 2

So I moved it to mono-config.)

@kumpera
Copy link
Contributor

kumpera commented Aug 2, 2013

We're not going to expose a global variable in the API. This is a no go.

A mono_config_set_server_mode function should be added instead.

@knocte
Copy link
Contributor Author

knocte commented Aug 4, 2013

@kumpera thanks for the review.

I guess you also mean that I should add a getter "mono_config_get_server_mode" to be used in threadpool.c? If yes, then this raises the question: is desktop mode a non-server mode? In case neither --desktop nor --server flags are provided, is that a different 3rd mode? If not, then either --desktop or --server should be a default?

@kumpera
Copy link
Contributor

kumpera commented Aug 5, 2013

I guess we're down to 3 modes: mobile, desktop, server.

It's fine if we have 2 modes leading to the same execution decision.

@knocte
Copy link
Contributor Author

knocte commented Aug 6, 2013

Ok, so I guess I'll assume that mobile mode will be the one that is enabled when no --desktop or --server flag is passed. I'll also assume you're fine with "mono_config_get_server_mode" and I'll update the PR. Thanks!

Create on demand up to min_threads to avoid startup penalty, avoiding
throttling of threadpool worker thread creation (for now, using
a --server flag) at initialization.

When throttling happens, operations such as parallel https requests were
slowed down significantly due to all of the threads created in order
to complete the SSL operations.

Based on @kamalaboulhosn's patch (https://github.com/mono/mono/pull/640/files)
@knocte
Copy link
Contributor Author

knocte commented Aug 6, 2013

Commit amended, PR updated.

kumpera added a commit that referenced this pull request Aug 16, 2013
[ThreadPool] Allow heavier initialization when using --server flag
@kumpera kumpera merged commit e86837b into mono:master Aug 16, 2013
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
[ThreadPool] Allow heavier initialization when using --server flag

Commit migrated from mono/mono@e86837b
AlexKnauth pushed a commit to AlexKnauth/mono that referenced this pull request Nov 2, 2023
…ing-il2cpp-debugger-vtsu-tweaks

IL2CPP Debugger VSTU stepping tweaks
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