-
Notifications
You must be signed in to change notification settings - Fork 110
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Expanding functionallity of findPortalGuidByPositionE6 #418
Comments
UNIQUES040 #416 would greatly profit from extending |
earlier comments from @johnd0e |
@MysticJay There is one other option: |
I have some small but rather important clarifications about that's plugin caching implementation:
So my conclusion: the plugin is not so useful as someone would imagine.
Not really, because that cache is tooo small.
That's why answer is "No way". It is just pointless.
And also many others plugins. That's why I'd prefer some clean api solution for all them. |
|
And one more clarification: as currently implemented, portal guid MUST be in cache already, otherwise that data is just lost. The more effective strategy would be save those unresolved latlngs for later checking. |
is https://github.com/IITC-CE/ingress-intel-total-conversion/blob/master/core/code/data_cache.js not already doing the same thing? with the exception that the data isn't rendered and not stored for 12hours - but with improved memory managment. |
@johnd0e From the discussion I agree. Cache portals on map seems less usefull in resolving guid. uniques is already remembering unresolved portals missedLatLngs OFFLE saves guids even on reload, so for the time we can leave ir with that. |
Well,
But indeed, it looks like for Edit: |
@johnd0e The problem is not getting something out of the cache if guid is know, but to find the guid when you only have LatLonE6 from the COMM. |
@MysticJay Obviously. But my message was not about it. |
Should this issue stay opened? |
@johnd0e this is implemented in Offle afaik |
effected plugin: CACHE-PORTALS-ON-MAP
The function
findPortalGuidByPositionE6
is converting an E6-Position in to a guid.This is only possible for portals in the current viewport for selected or at zoom level "all portals", as portal details need be loaded.
The plugin CACHE-PORTALS-ON-MAP caches the portal details, but does not allow the function
findPortalGuidByPositionE6
to benefit from that information.The code to add the functionality is ready and available from PR#389 (which was reverted)
The discussion is about how to inject the code into the existing
findPortalGuidByPositionE6
The proposed code uses code injection by calling the original function.
The alternative would be a hook, but that slows down the processing as all hooked functions would need to be executed without the possibility to stop execution if the guid is found.
A third alternative would be to overwrite the core function. But this would cause changes to the core function never to get active, when CACHE-PORTALS-ON-MAP is loaded.
OFFLE, a 3rd-party plugin, is also providing caching functionality for portal data. OFFLE has also been changed to use code injection to extend the core function
findPortalGuidByPositionE6
.The text was updated successfully, but these errors were encountered: