As can be seen here pnd_notify.c (and thus libpnd) watches for IN_MODIFY, this means that any time someone writes to a pnd it will trigger an update. This is highly inefficient (and potentially dangerous), any time you're downloading something into a pnd-watched folder the cpu will spike as it tries to re-read it over and over.
The proper way to do this would be to wait for IN_CLOSE_WRITE in it's place, this will trigger when (and only when) someone had a file open with writing privilieges and then closed it.
As an example I downloaded gemrb 0.6.3 (8.6M) into a pnd-controlled folder and outside a pnd-controlled folder. The difference? From taking 9-11 seconds it took 15-27 seconds(!).
(User and sys time will naturally not be affected as wget itself does no additional work, this was on a local wifi network without any particular traffic going on.)
Outside:
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m10.440s
user 0m0.031s
sys 0m0.172s
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m9.270s
user 0m0.023s
sys 0m0.180s
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m9.651s
user 0m0.039s
sys 0m0.211s
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m11.207s
user 0m0.063s
sys 0m0.164s
Inside:
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m26.152s
user 0m0.023s
sys 0m0.461s
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m27.352s
user 0m0.039s
sys 0m0.445s
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m15.563s
user 0m0.016s
sys 0m0.570s
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m21.373s
user 0m0.023s
sys 0m0.313s
The proper way to do this would be to wait for IN_CLOSE_WRITE in it's place, this will trigger when (and only when) someone had a file open with writing privilieges and then closed it.
As an example I downloaded gemrb 0.6.3 (8.6M) into a pnd-controlled folder and outside a pnd-controlled folder. The difference? From taking 9-11 seconds it took 15-27 seconds(!).
(User and sys time will naturally not be affected as wget itself does no additional work, this was on a local wifi network without any particular traffic going on.)
Outside:
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m10.440s
user 0m0.031s
sys 0m0.172s
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m9.270s
user 0m0.023s
sys 0m0.180s
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m9.651s
user 0m0.039s
sys 0m0.211s
ender:/media/mmcblk0p1/testing$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m11.207s
user 0m0.063s
sys 0m0.164s
Inside:
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m26.152s
user 0m0.023s
sys 0m0.461s
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m27.352s
user 0m0.039s
sys 0m0.445s
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m15.563s
user 0m0.016s
sys 0m0.570s
ender:/media/mmcblk0p1/pandora/menu$ time wget -q http://frolic.xvx.se/_full/10/2/gemrb-0.6.3.pnd
real 0m21.373s
user 0m0.023s
sys 0m0.313s