<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Серый форум &mdash; AHK: A_LoopFileLongPath тормозит]]></title>
	<link rel="self" href="https://forum.script-coding.com/extern.php?action=feed&amp;tid=10969&amp;type=atom" />
	<updated>2015-09-22T07:37:24Z</updated>
	<generator>PunBB</generator>
	<id>https://forum.script-coding.com/viewtopic.php?id=10969</id>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97641#p97641" />
			<content type="html"><![CDATA[<p>Lexikos ответил, что так и задумано не сохранять ее в память.<br />Что A_LoopFileLongPath&nbsp; это GetFullPathName(A_LoopFileFullPath) и что при вызове ее каждый раз посылается запрос. <br /><a href="https://msdn.microsoft.com/en-us/library/aa364963">https://msdn.microsoft.com/en-us/library/aa364963</a></p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-22T07:37:24Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97641#p97641</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97640#p97640" />
			<content type="html"><![CDATA[<p>Спросил на офф.форуме.<br />По-моему логично было бы сохранять A_LoopFileLongPath в память.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-22T06:59:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97640#p97640</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97639#p97639" />
			<content type="html"><![CDATA[<p>Первый раз&nbsp; 4-5 сек.<br />Второй 0. Скорей всего просто в памяти сохраняется.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-22T06:53:07Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97639#p97639</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97638#p97638" />
			<content type="html"><![CDATA[<p>Запустите следующий код.<br />У меня в первом случае выскакивает от 1000 до 2000, во втором стабильно 0.<br />Происходит непонятная утечка в A_LoopFileLongPath.<br /></p><div class="codebox"><pre><code>Start := A_TickCount
Loop, Files, C:\*.exe, R
{
   loop 10000
      a := A_LoopFileLongPath
   break
}
msgbox % A_TickCount - Start

Start := A_TickCount
Loop, Files, C:\*.exe, R
{
   loop 10000
      a := A_LoopFileFullPath
   break
}
msgbox % A_TickCount - Start</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-22T06:49:55Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97638#p97638</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97637#p97637" />
			<content type="html"><![CDATA[<p>Чем больше древо папок тем дольше загрузка получается.<br />Но на второй раз проверки практически мгновенно выводит.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-22T06:42:16Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97637#p97637</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97636#p97636" />
			<content type="html"><![CDATA[<p>У вас мой первый пример работает без тормозов?<br />Цель топика только одна - это баг или не баг.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-22T06:21:43Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97636#p97636</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97635#p97635" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Если заменить A_LoopFileLongPath на A_LoopFileFullPath, то результаты идентичны.</p></blockquote></div><p>Если указывать не точный адрес, то есть вот так:<br /></p><div class="codebox"><pre><code>Loop, Files, *.mp3,R,
{}Until (A_Index=1) and (a:= A_LoopFileLongPath) true and (b:=A_LoopFileFullPath) true

msgbox % a &quot;`n&quot; b</code></pre></div><p>Различия есть, в одном полный путь, в другом относительный от места старта.</p>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-22T06:16:51Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97635#p97635</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97634#p97634" />
			<content type="html"><![CDATA[<div class="quotebox"><blockquote><p>Malcev, А зачем один и тот же результат присваивать 1000 раз в одну переменную?</p></blockquote></div><p>Для теста.<br /></p><div class="quotebox"><blockquote><p>Если надо что бы просто первый результат брался и стоп цикл то вот компактный вариант:</p></blockquote></div><p>Тормоза возникают только при использовании рекурсии и A_LoopFileLongPath.<br />A_LoopFileFullPath - работает в порядке.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-22T06:12:52Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97634#p97634</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97633#p97633" />
			<content type="html"><![CDATA[<p><strong>Malcev</strong>, А зачем один и тот же результат присваивать 1000 раз в одну переменную?<br /></p><div class="quotebox"><blockquote><p>Что-то они напортачили с рекурсией.</p></blockquote></div><p>А что с ней не так? У меня если нет файлов в основной папке при опции R, ответ просто 0. А в этой папке еще папка с файлами, при R показывает их путь.<br />Да и лагов вроде как нет.<br />Если надо что бы просто первый результат брался и стоп цикл то вот компактный вариант:<br /></p><div class="codebox"><pre><code>Loop, Files, E:\*.mp3,R,
{}Until (A_Index=1) and (a:= A_LoopFileFullPath) true

msgbox % a </code></pre></div>]]></content>
			<author>
				<name><![CDATA[yalanne]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=32850</uri>
			</author>
			<updated>2015-09-22T06:00:48Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97633#p97633</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97631#p97631" />
			<content type="html"><![CDATA[<p><a href="http://ahkscript.org/docs/commands/LoopFile.htm">http://ahkscript.org/docs/commands/LoopFile.htm</a><br />&quot;Loop, Files, I:\*.mts, R&quot; = &quot;Loop, I:\*.mts, ,1&quot;<br />Что-то они напортачили с рекурсией.</p>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-22T05:32:20Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97631#p97631</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[AHK: A_LoopFileLongPath тормозит]]></title>
			<link rel="alternate" href="https://forum.script-coding.com/viewtopic.php?pid=97629#p97629" />
			<content type="html"><![CDATA[<p>Имеем 2 кода. Это баг или что?<br />Если заменить A_LoopFileLongPath на A_LoopFileFullPath, то результаты идентичны.<br /></p><div class="codebox"><pre><code>Start := A_TickCount
Loop, Files, I:\*.mts, R
{
   loop 1000
      a := A_LoopFileLongPath
   break
}
msgbox % A_TickCount - Start

Start := A_TickCount
Loop, Files, I:\*.mts, R
{
   b := A_LoopFileLongPath
   loop 1000   
      a := b
   break
}
msgbox % A_TickCount - Start</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Malcev]]></name>
				<uri>https://forum.script-coding.com/profile.php?id=26930</uri>
			</author>
			<updated>2015-09-21T22:50:03Z</updated>
			<id>https://forum.script-coding.com/viewtopic.php?pid=97629#p97629</id>
		</entry>
</feed>
