Difference between revisions of "Throttling"

From PowerUI
Jump to: navigation, search
(Created page with "By default, PowerUI will dispatch all web requests immediately. This can result in scenarios where large amounts of UI's being created at once can hit a server hard, and poten...")
 
 
Line 1: Line 1:
 
By default, PowerUI will dispatch all web requests immediately. This can result in scenarios where large amounts of UI's being created at once can hit a server hard, and potentially result in the server throttling your requests or outright rejecting them. You can limit this using the built in max request limit:
 
By default, PowerUI will dispatch all web requests immediately. This can result in scenarios where large amounts of UI's being created at once can hit a server hard, and potentially result in the server throttling your requests or outright rejecting them. You can limit this using the built in max request limit:
  
<syntaxHighlighting lang="csharp">
+
<syntaxhighlight lang="csharp">
 
// During setup
 
// During setup
 
PowerUI.Http.Web.MaxSimultaneousRequests = 6;
 
PowerUI.Http.Web.MaxSimultaneousRequests = 6;
</syntaxHighlighting>
+
</syntaxhighlight>
  
 
Using '6' essentially matches Chrome. This will restrict the maximum number of simultaneous HTTP/S requests leaving PowerUI to the number you specify. The default is -1 meaning no limit. Any additional requests made will simply wait in a queue until prior requests complete.
 
Using '6' essentially matches Chrome. This will restrict the maximum number of simultaneous HTTP/S requests leaving PowerUI to the number you specify. The default is -1 meaning no limit. Any additional requests made will simply wait in a queue until prior requests complete.

Latest revision as of 22:25, 29 November 2018

By default, PowerUI will dispatch all web requests immediately. This can result in scenarios where large amounts of UI's being created at once can hit a server hard, and potentially result in the server throttling your requests or outright rejecting them. You can limit this using the built in max request limit:

// During setup
PowerUI.Http.Web.MaxSimultaneousRequests = 6;

Using '6' essentially matches Chrome. This will restrict the maximum number of simultaneous HTTP/S requests leaving PowerUI to the number you specify. The default is -1 meaning no limit. Any additional requests made will simply wait in a queue until prior requests complete.