[Development] QFileSystemWatcher and Recursive Monitoring

d3fault d3faultdotxbe at gmail.com
Tue Jul 24 07:04:58 CEST 2012


On Jul 23, 2012 7:51 PM, "logic.cpp" <logic.cpp at gmail.com> wrote:
>
> So - are you suggesting that Qt file-system monitoring facilities
> should actually generate an in-memory snapshot of the necessary
> directory tree(s) for platforms that need it (in this case Mac OSX <=
> Snow Leopard) ?
>
> Hey I'm not against, it would be really easy to implement. But you
> should really try testing something like this yourself on your
> computer first. It's /really/ memory consuming as well as /really/
> time consuming for large trees of stuff, fairly common nowadays in
> anyone's photo/music/video/doc etc. collection. Sure we can alleviate
> the time-consuming part with a worker thread, but I'm telling you this
> is quite a hunk of resources you're signing off Qt to consume for a
> possibly large percentage of use cases (many many people out there
> have <= Snow Leopard).

The amount of resources consumed is irrelevant if the _user_ consumes the
same amount with their custom implementation. The only value gained in
doing the work up front in Qt / behind the scenes is that now every _user_
developer doesn't have to implement it manually. It will save a ton of man
hours from having to reinvent the wheel.

You mentioned giving the user a choice on whether Qt maintains the state
comparison tree or not. This is definitely the optimal choice, but:
a) adds design complexity
b) would maybe be confusing on platforms where it's n/a
both of those problems are solvable (obscure the (b) choice somewhat... i
think i recall a Mac-specific QMainWindow function regarding the toolbar
and OS integration. do something like that)

>
> BTW d3fault are you on IRC? What's your handle & timezone, maybe we
> can chat about this more.
>

I'm not on IRC lately but you can email me if you want. Irregular/shifting
sleeping patterns so timezone won't help.

> P.S. Just on a personal note, the reason I got caught up in all this
> to begin with was some application I wanted to develop. My particular
> project involves a snapshot of the file system anyway, so in my
> particular case on MacOSX<=Snow Leopard I would definitely just obtain
> directory-level information from FSEvents and proceed to compare the
> directory's contents with that of my existing snapshot.
> In fact if Qt is gonna do a whole in-memory snapshot as d3fault
> suggests for this situation, I'm considering dropping this whole QFSW
> campaign and just roll out my own solution :)

Might as well contribute your own solution then. This way you don't have to
maintain the code... everyone else (myself included) benefits... and you
don't even have to write that much more code. You just organize it
differently (and comply with Qt coding standards etc).

d3fault
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20120723/12f4a8af/attachment.html>


More information about the Development mailing list