The sensor attached to your fork, is a coil of wire. When the magnet goes past it, it "feels" a change in the magnetic field, which gets stronger as the magnet approaches and then weakens as the magnet goes past and away.
This change in the magnetic field, creates a voltage in the coil. The faster the magnetic field changes, the higher the voltage. So, the faster the magnet moves past the wheel, the sharper a voltage pulse the sensor creates.
(also, the closer the magnet comes to the sensor, the stronger the pulse. But once you've got the sensor and magnet mounted, this closeness doesn't change, it's the same for every revolution no matter how fast or slow).)
Conceivably, if the magnet moves verrrrrrry slllloowwwwly past the sensor, it might not "feel" the magnet strongly enough - it might create only a very low voltage pulse, that the computer doesn't see as a legit pulse.
So IMHO, mounting the magnet and sensor closer to the rim, is good. The magnet will whip past the sensor more quickly and create a higher-voltage pulse. This means that, even if you are going slowly (walking the bike?), you will get a reading on your speedometer.
That said, I have one bike with the magnet and sensor mounted about 6" from the axle, and I get a good reading even at 2mph. Also get good readings at 30mph, which is as fast as I've pushed that bike recently (fat people go down hills really fast
) So I guess that particular computer can handle even pretty-low-voltage pulses.
The rest of my bikes with computers, have the magnet and sensor mounted about 6" from the rim. They also work great.
YMMV.
In general, I'd mount it fairly close to the rim if I were you.