MTA:Eir/functions/engineStreamingGetFiberedPerfMultiplier: Difference between revisions
Jump to navigation
Jump to search
(Created page with "__NOTOC__ This function returns the fibered loading execution time percentage of the MTA:Eir Streaming system. It is responsible for the CPU load c...") |
m (→Example) |
||
(One intermediate revision by the same user not shown) | |||
Line 29: | Line 29: | ||
engineStreamingSetFiberedPerfMultiplier( normalFiberedPerc * 2 ); | engineStreamingSetFiberedPerfMultiplier( normalFiberedPerc * 2 ); | ||
end | end | ||
elseif ( | elseif ( normalFiberedPerc ) then | ||
engineStreamingSetFiberedPerfMultiplier( normalFiberedPerc ); | engineStreamingSetFiberedPerfMultiplier( normalFiberedPerc ); | ||
normalFiberedPerc = false; | |||
end | end | ||
end | end |
Latest revision as of 20:15, 12 December 2013
This function returns the fibered loading execution time percentage of the MTA:Eir Streaming system. It is responsible for the CPU load caused by the Streaming system. Lower values decrease the probability of lag-spikes that happen when loading big resources (such as TXDs or COLL sectors).
Since every Streaming slicer is assigned its own fiber, the execution time may be a multiplied by the amount of slicers (internally only).
By default, the frame time execution percentage is set to 0.6.
Syntax
double engineStreamingGetFiberedPerfMultiplier ()
Returns
Returns a double that designates the percentage of frame time the Streaming loading is allowed to take in fibered mode.
Example
Click to collapse [-]
ClientThis snippet doubles the amount of frame time the fibered loader is allowed to take when the Streaming system is busy.
local normalFiberedPerc = false; addEventHandler( "onClientPreRender", root, function() local isBusy = engineGetStreamingInfo().isBusy; if ( isBusy ) then if not ( normalFiberedPerc ) then normalFiberedPerc = engineStreamingGetFiberedPerfMultiplier(); engineStreamingSetFiberedPerfMultiplier( normalFiberedPerc * 2 ); end elseif ( normalFiberedPerc ) then engineStreamingSetFiberedPerfMultiplier( normalFiberedPerc ); normalFiberedPerc = false; end end );