40ft of 3/4 pipe = 12m
3/4 PEX pipe = 17mm internal diameter
Pipe contains 0.23 l/m so total 2.7l
Considering a standard flow of 20l/min with the faucet fully open on hot, for water to go all the way through that pipe, that's a volume of 2.7l, so it takes 2.7/20*60 = 8.7 seconds.
Even if the pipe is twice as long, that's still far from 2 minutes. If you wait for 2 minutes, then either the tankless heater has a long startup delay, or it restricts the flow, which means hot water takes longer to run through the pipe, or both.
- Measure flow on hot and cold.
Just use a stopwatch to time how long it takes to fill a known volume container, for example a kitchen pot. It doesn't need to be very accurate.
Normally with a tank heater the hot flow should be a bit less than the cold flow because the heater safety and check valve introduce some loss. But it should definitely not be half. If it's less than half, or much less like on my previous tankless heater, then here's your problem.
To heat 1 liter of water by 1°C you need 4.4kJ. So if water arrives at about 12°C and is heater to 60°C (delta T = 48°C) at a flow of 1l/min (1/60 l/s) that's a heating power of deltaT * flow * 4.4kJ = 3500W. (watts are J/s).
If you know the power of your heater, for example it has a thermal output of 20kW burning gas, then you know it can't have more than 20kW/(l/min)/3.5kW = 5.6 l/min flow.
If all goes well, the pot and stopwatch method should agree with the calculation from heater power, and you'll probably conclude it has a pretty wimpy flow like all tankless heaters, which means water takes forever to go through the pipe.
So, to get hot water faster, it needs to move faster through the pipe, which means it has to be colder.
The solution is super simple and cheap: install a thermostatic valve at the output of the heater. I don't know how it's called in your country, but it's this thing.
There's a hot input (to your heater), a cold input, and a warm output.
If you set it to a reasonable temperature like 40°C, then, when the faucet is fully open, it will input whatever hot water the heater delivers from the hot input, and as much cold water as necessary from the cold input to give the set temperature. This means the output flow is much higher than what your heater can deliver (because cold water is added to the hot water), and thus, it goes much faster through the length of the pipe. In addition, water at the faucet will be limited to 40°C, which is safer.
This a rather cheap fix (one thermo valve and a bit of PEX and fittings, no need to rip pipe out of the walls, etc) so it's the first thing to try.
It should shave off about 30 seconds off your hot water waiting time, the rest being the tankless heater taking forever to startup, as they all do.
To get a shorter time...
Recirculation to the faucet either wastes a lot of energy if it dumps the hot water into the cold pipe, or requires laying new pipe which means making a mess.
Local electric heaters at the faucets can also work, but you lose the cupboard under the sink, and you have to put them everywhere, which is annoying, more maintenance, etc.
Since delay through pipes is no longer a problem once you add a thermo valve, the simplest is to add a tank to your main heater. This doesn't mean you absolutely need to replace the tankless heater with a new heater. Perhaps it can be reconfigured to work with a tank and keep it at the set temperature with a recirculation pump, but you'll have to check the manual for that.