quite a lot of optimization... needs testing, but if everything works, only bottleneck is now the localrecords at end of the map, it does 300 queries in arow to update the records :(  which will slow down drawing the ui