location /

Gena Makhomed gmm на csdoc.com
Вт Окт 11 11:18:02 UTC 2011


On 11.10.2011 12:53, Igor Sysoev wrote:

>> "Files are processed in alphabetical order",
>> в случае же nginx - ни в документации,
>> ни в conf.d/README, ни в исходниках
>> не написано, что включаемые файлы
>> обрабатываются in alphabetical order.

>> GLOB_NOSORT в исходниках nginx стоит ради производительности,
>> потому что через include включаться могут и сотни тысяч файлов.

> GLOB_NOSORT стоит не ради производтельности, а ради совместимости
> с Windows. Там сейчас include делается через несортированный FindFirst/Next.

ясно.

только это совместимость с файловыми системами FAT12/FAT16/FAT32/exFAT,
потому что если используется NTFS файлы выдаются в отсортированном виде:

http://msdn.microsoft.com/en-us/library/windows/desktop/aa364428(v=vs.85).aspx

...

The order in which the search returns the files, such as alphabetical 
order, is not guaranteed, and is dependent on the file system. If the 
data must be sorted, the application must do the ordering after 
obtaining all the results.

...

The order in which this function returns the file names is dependent on 
the file system type. With the NTFS file system and CDFS file systems, 
the names are usually returned in alphabetical order. With FAT file 
systems, the names are usually returned in the order the files were 
written to the disk, which may or may not be in alphabetical order. 
However, as stated previously, these behaviors are not guaranteed.

...

-- 
Best regards,
  Gena



Подробная информация о списке рассылки nginx-ru