this can only return something if `portalLayer` is set, right? In all other cases the portal+resos were either removed before or don’t exist yet. Checking for `portalLayer` might speed things up if a lot of new portals+resos are to be rendered. Maybe something like:

```javascript
if(portalLayer) {
  var oldRes = findEntityInLeaflet(layerGroup, window.resonators, portalResonatorGuid(ent[0], i));
  if(oldRes && compareResonator(oldRes.options.details,rdata)) continue;
}
```
might work