﻿id	summary	reporter	owner	description	type	status	milestone	component	version	severity	resolution	keywords	cc
625	Page faults caused by Sleep	JRSmile		"Hi there,
i noticed in a service that i have written that autoit generates massive page faults when there is a loop in the source code with a sleep more then 250 ms, this is caused by windows moving the memory to the page file while the autoit script sleeps and moves it back when autoit gets awake.

i created a small sleep function that can handle one parameter that will be held in memory due to constant accessing it, but this should not be the solution.

Would a developer have a look if this bad thing can be patched away in the autoit binary functions itself?.

here the function:
Func _sleep($time, $var)
	$time *= 4
	while $time
		Sleep(250)
		$time -= 1
		if IsArray($var) Then
			if $var[0] or 1 = 1 Then ContinueLoop
		Else
			if $var or 1 = 1 Then ContinueLoop
		EndIf
	WEnd
EndFunc

maybe you get the clue then :) for me it works.
i use autoit often as service so it will run 24/7 for example in 48 hours it generates 101714852528 page faults, 10000 per second if it is NOT in the 50 second sleep loop."	Bug	closed		AutoIt	Other	None	No Bug	3.2.12.1	
