Hi John,

Thank you for the link to Traverse implementation; I should have
looked there myself. VZ uses GetFirst and GetNext, whereas I actually
use FindFirst and FindNext. I'm not sure what exactly the differences
are, but I'll re-implement Traverse in Lua and see if it is
sufficiently fast for my needs.

Paul.

On Fri, Mar 15, 2013 at 6:24 PM, Paul K <paulclin...@yahoo.com> wrote:
> Hi John,
>
> I do that now (I use GetFirst() and GetNext()), but it's a bit slow
> for my purposes. GetAllFiles is much faster, but my main problem with
> it is that I can't exclude directories I don't need (for example,
> .git, .svn and others), and those can be quite slow to scan (due to a
> large number of directories and files).
>
> For example, when I try GetAllFiles it scans a folder with 278 files
> (including subfolders, most of these are in .git folder), it takes
> 0.8s to scan (and subsequent runs only take 0.08s or so). Same folder
> without .git subfolder takes only 3ms or so to scan (17 files).
>
> I'm hoping that the Traverse method would give me a way to do it fast,
> but also allow me to filter out those folders I don't need.
> Unfortunately I can't test it without having access to it.
>
> Paul.
>
> On Fri, Mar 15, 2013 at 5:51 PM, John Labenski <jlaben...@gmail.com> wrote:
>> On Fri, Mar 15, 2013 at 8:25 PM, Paul K <paulclin...@yahoo.com> wrote:
>>> Hi John,
>>>
>>> I noticed that wxlua is missing the Traverse method in wxDir object
>>> (http://docs.wxwidgets.org/2.8/wx_wxdir.html#wxdirtraverse).
>>
>> Please use GetAllFiles() or roll your own GetFirst() GetNext()
>> recursive function instead.
>> http://wxlua.sourceforge.net/docs/wxluaref.html#wxDir
>>
>> An example of how to do that is here, see wxDir::Traverse()
>> http://svn.wxwidgets.org/viewvc/wx/wxWidgets/trunk/src/common/dircmn.cpp?view=markup
>>
>> I don't really see any gain in using it for Lua programs as it just
>> adds a layer of complexity and without enumeration type-safety can
>> cause more problems than it would solve.
>>
>> Regards,
>>     John
>>
>> ------------------------------------------------------------------------------
>> Everyone hates slow websites. So do we.
>> Make your web apps faster with AppDynamics
>> Download AppDynamics Lite for free today:
>> http://p.sf.net/sfu/appdyn_d2d_mar
>> _______________________________________________
>> wxlua-users mailing list
>> wxlua-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/wxlua-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to