25769[TASK] Optimization of GeneralUtility::get_dirs()
Commit message
Review
-
Code review CR 0
-
Verified V 0
Issues 1
Files 1
Review log 21
-
Wouter Wolters wrote 11/29/13, 18:05
Topic set to "performance". -
Michiel Roos commented on patch set 1 11/29/13, 18:06
-
Wouter Wolters voted on patch set 1 CR +1 11/29/13, 18:12
-
Mr. Jenkins commented on patch set 1 11/29/13, 18:18
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/12394/ : SUCCESS -
Markus Klein commented on patch set 1 11/29/13, 23:56
GeneralUtility.php:2759$path . '/*'GeneralUtility.php:2760Is the check for '..' and '.' not necessary anymore?GeneralUtility.php:2761I don't think it is a good idea to modify the array we're just traversing. -
Michiel Roos uploaded patch set 2 11/30/13, 21:57
-
Michiel Roos commented on patch set 2 11/30/13, 21:59
New tests: http://pastebin.com/TfYL72Pd http://www.typofree.org/fileadmin/get_dirs.php The version that also finds hidden directories still completes in 40% of the time of the currently used function. -
Mr. Jenkins commented on patch set 2 11/30/13, 22:09
Build Successful https://ci.typo3.org/job/typo3-v4-core-gerrit/12406/ : SUCCESS -
Markus Klein voted on patch set 2 CR +1 11/30/13, 22:15
-
Christian Kuhn commented on patch set 2 CR -1 12/01/13, 11:00
get_dirs currently only has basic unit test coverage looking for error handling. please add at least one test to verify expected result. -
Oliver Klee commented on patch set 2 CR -1 12/08/13, 12:05
One note concerning unit testing: If we cover this method with unit tests using VfsStream, we cannot use glob as vfsstream does not work with glob. scandir works fine, though. See this ticket for details: https://github.com/mikey179/vfsStream/issues/2 -
Dmitry Dulepov commented on patch set 2 12/09/13, 13:07
Can have problems here: - glob() does not work on non-local paths (like mounted NFS shares) - glob() returns FALSE if open_basedir is enabled and the path is not inside the open_basedir -
Michiel Roos commented on patch set 2 01/10/14, 13:16
Ok, glob is out because of a bug in glibc: https://bugs.php.net/bug.php?id=22641&edit=3 -
Oliver Hader commented on patch set 2 01/13/14, 13:14
Michiel, did you analyze or experience that behaviour? The issue you mentioned points back to 2003 - more than 10 years ago -
Michiel Roos commented on patch set 2 01/13/14, 13:27
Oooh, 2003. Nice catch! No, I did not. Will do maybe this evening. -
Michiel Roos commented on patch set 2 01/13/14, 23:46
This seems to be fixed. On Mavericks at least. Connecting to a Ubuntu NFS. No files are found, only dirs. -
Michiel Roos commented on patch set 2 01/13/14, 23:58
Here's a new permanent pastie for verification: http://pastebin.com/2ZcP4uCD -
Michiel Roos commented on patch set 2 02/04/14, 12:19
Dmitry, Can you please attempt to verify that this indeed does break on NFS? The bug is from 2003 and it's now 2014. Thank you. -
Michiel Roos abandoned the change 02/17/14, 21:35
Since nobody is brave enough to test this, I'm abandoning my child. It may return in the upcomming 6.2 JetPack extension / patch set that will contain more of these abandoned improvements. -
Stephan Großberndt commented on patch set 2 09/05/14, 18:53
Still nobody using NFS? I don't - otherwise I'd test it... -
Michiel Roos commented on patch set 2 09/08/14, 08:15
It's not that hard to set up a test environment in a virtual machine.