1146 Commits

Author SHA1 Message Date
Jon Atkins
238bef037b fix for niantic site update 2015-05-27 - botguard has been removed! 2015-05-27 07:08:43 +01:00
Jon Atkins
f4f656dcd2 artifacts: comment concerning the new API added to stock intel. not yet used by stock as far as I can tell, and the existing API still exists and is used... 2015-05-22 01:49:01 +01:00
Jon Atkins
aad6f3cd70 add callback to create point features for search results - the default leaflet icon won't work (and would be the wrong colour anyway)
fix #998
2015-05-14 16:41:18 +01:00
Jon Atkins
5b5c6d5947 ensure there's a delay after an empty response from the server
also, shorten error delays from 10 seconds to 5 - no need to be that slow...
2015-05-14 16:32:48 +01:00
Jon Atkins
2fce62117c restopre 'show more portals', but at one level of zoom boost instead of two 2015-05-06 18:28:08 +01:00
Jon Atkins
bb5d263a73 allow max zoom of 21 - two portals 18cm apart only show at z=21 2015-05-06 17:08:20 +01:00
Jon Atkins
d9abda87f3 remove confirm prompt on server-returned javascript
more people ask about what this prompt is about, and answering 'no' generally breaks botguard at this point.

if you don't like the possibility of IITC running server-returned code, then disable the botguard interface completely - we're already running it on page load, so there's no more risk doing it here too
2015-04-27 21:56:23 +01:00
Jon Atkins
439fcae210 artifacts: lightman shards (guessed - but image URLs work so probably OK) 2015-04-22 02:48:08 +01:00
fkloft
2933f596e9 [core] small changes to cookie handling
- dynamic cookie expiration date
- remove cookie cache (which is not updated when a cookie is set)
2015-04-13 21:58:05 +02:00
Joseph Verburg
aa48e18639 Fix some tiles not getting returned at all by map requests, causing a tile to never be requeued. 2015-04-08 16:36:07 +02:00
Jon Atkins
658344a832 additional message asking users to direct their 'show more portals' issues towards niantic 2015-04-04 01:05:30 +01:00
Jon Atkins
2e906b41f0 as well as 9000 and 36000, allow the interbediate 18000 when detecting map tile params
this value was live for a short period of time, and they may revert back to it
2015-04-03 22:35:05 +01:00
Jon Atkins
b4f9c3e2fe add some initialisation for deciding if to use detected tile params or those embedded in the code
console warnings when it fails to detect values from stock, or the internal defaults don't match
disable show-more-portals plugin if it would result in more requests - damn niantic!
2015-04-03 21:20:36 +01:00
Jon Atkins
3e7724afe6 first pass at changing map tile params for latest site update 2015-04-03 20:50:10 +01:00
Jon Atkins
5845c37daf change tile loading delays to zero. stock intel doesn't wait, and the current tile params for further out zooms need a large number of requests, making any delays here add up quickly 2015-03-28 18:32:40 +00:00
Jon Atkins
96190be481 extract TILES_PER_EDGE and ZOOM_TO_LEVEL from stock intel
Niantic have been tweaking the values after server overload during Shonin - I expect them to change again...
2015-03-28 18:27:06 +00:00
Jon Atkins
a169176bad map params adjusted due to server overload of shonin anomaly 2015-03-28 16:27:48 +00:00
Jon Atkins
5e8ddb2344 move portal entity array decoding into one place, and share the code for the common array elements
TODO: move link and field entities into here too
2015-03-20 20:54:44 +00:00
Jon Atkins
5298c98fdd minor api change for chat callbacks, and plugins fixed to use the new changes
(which broke after today's niantic site update anyway)
2015-03-20 20:53:45 +00:00
fkloft
d98546a173 fix chat after intel change 2015-03-20 21:30:52 +01:00
Jon Atkins
c5b068eda1 ignore portals returned in the map data that are below the portal level requested
this shouldn't be needed - the stock intel map completely ignores these so they shouldn't be returned - but since niantic added mission portals to the map they bypass all portal level filtering code, for some reason
2015-03-12 21:33:22 +00:00
Jon Atkins
2f67616c5d unknown_10/11 flags - renamed to the mission status they represent 2015-03-12 20:26:15 +00:00
Jon Atkins
052d208783 increase latlng to guid cache size 2015-03-07 16:55:01 +00:00
eidyia
fe19227839 Eliminate CPU churning on cache highwater check
On older machines loading high portal dense areas this check is
using 70-90% of CPU in Object.keys(cache).length, leading to
resource starvation, and refresh times up to 10 times longer.

The LRU cache high-water mark is checked every time we receive portal
state from the intel servers to see if we need to do GC. In
my case this peaks out  500-1000 portal adds per second on
an aging laptop with the existing code with chrome-unstable,
and minimal IITC plugins.  GC itself (ignoring v8 GC) was only
taking 15ms, amortized to about 15usec a portal.

Unforutnately the Object.keys(cache).length check was taking
2-3ms each portal add, and 70-90% of the main thread was spent
there, grinding older machines to a halt.

I've just added a counter to track adds to the cache, and am
updating it with the real cache size on GC (the two checks
are almost always identical in higher density areas, and
won't lead to performance issues if cache adds are over-
estimated).

Effects:
 - pushPortalGuidPositionCache goes from using the majority
   of CPU when loading dense areas to almost nothing.

 - Older machines can actually view western europe without
   grinding the browser to a halt.

 - the cache itself is now hitting GC_LIMIT in less than
   100ms on my old laptop.  (I think increasing GC_LIMIT
   to 80,000 and GC_KEEP to 40,000 is going to put less
   load on the Javascript engine GC, and have the cache
   be useful still, but I left that out of the PR as it's
   slightly more subjective)

 - v8's GC is being slammed slightly less often than normal
   (it's still thrashing, but this isn't the main culprit)

The patch has been tested by about half a dozen people
using different blends of IITC plugins on both Chrome,
Firefox and across different OSs and with very different
hardware. Reports ranged from minor to (more often) huge
improvements in load speed and responsiveness in high
density areas.
2015-03-08 03:01:54 +11:00
Jon Atkins
b6c89c9575 tooltip tweaks - slightly cleaner this way, i think 2015-03-05 18:56:23 +00:00
Jon Atkins
54a6861aef code to easily disable botguard, if desired
not recommended for general use, but can be good for occasional troubleshooting
2015-03-05 18:55:28 +00:00
Jon Atkins
cabe7692fe tweaks to shonin shards 2015-03-05 18:54:53 +00:00
Jon Atkins
4336c2b29c Merge branch 'master' of https://github.com/jonatkins/ingress-intel-total-conversion 2015-03-05 18:49:14 +00:00
fkloft
e9d6436260 Support shonin shards
Fixes #951
2015-03-05 19:38:07 +01:00
Jon Atkins
55529c938e indentation, and dead code removal 2015-03-04 01:03:55 +00:00
Jon Atkins
3b96ed49ea radius scaling less extreme - reduced scale increase on mobile, reduced scale decrease when zoomed out 2015-03-03 21:05:42 +00:00
Jon Atkins
ece5dac26f portal markers: tweaks to the sizes used for different levels 2015-03-03 20:49:49 +00:00
Jon Atkins
6148ec4258 should have been local variables - no point in polluting the global namespace 2015-02-28 19:43:02 +00:00
fkloft
189f57afdd Fix bug with search
invalidateOptionsMenu was called way too often because setLoadingState would fire on every console message
2015-02-27 00:28:51 +01:00
Jon Atkins
7be1575e50 also set 'unknown_11' for map data, as well as portal details 2015-02-26 22:32:31 +00:00
fkloft
fb5c38662f Fix portal details after stock intel change 2015-02-26 22:19:40 +01:00
Jon Atkins
a0e539d6ca jquery: update to the latest version available on google 2015-02-25 13:34:56 +00:00
fkloft
93f0b8b572 better tooltip handling
- search: remove tooltip from DOM immediately instead of setting up a new instance (which would have other options)
- sidebar toggle: remove tooltip upon click, tooltip might persist otherwise
- close other tooltips before opening a new one
2015-02-23 13:18:22 +01:00
Jon Atkins
46275956cf data cache:
- reduce the expiry time (the niantic servers are no longer as unreliable as they were, so keeping old data is less useful than it once was)
- add upper size limit on cache, as well as item count limit
- add debug method to get cache size as a string
2015-02-22 17:00:18 +00:00
Jon Atkins
6ad6ee56cf remove entities by render bounds - will improve performance, particularly in the case of repeated panning/zooming without letting the download complete 2015-02-22 16:44:37 +00:00
Jon Atkins
600fe1f91c experimental: JSON encode the data stored in the cache
in theory, keeping the javascript objects directly in the cache is a good thing. any instances of, for example, portals on the map, will share the data objects with those in the cache, limiting the overheads for cached items in use
however, in practice
- relatively large and complex data structures for cached data. and as some items expired from the cache may have data in live portals, etc, complex for garbage collection to clean up. strings, on the other hand - one single object to clean, zero references from anything else
- the cache is used as an alternative to network requests. therefore the extra time to encode/parse the strings is no real issue
- lower memory overheads? it's liekly a single string is more efficient on RAM use, even taking into account that some objects will be both encoded in the string, and duplicated in live entities on the map

time will tell if this is better or worse than direct object storage...
2015-02-21 23:32:57 +00:00
Jon Atkins
f5b565b284 fix exception in bad http request on portal details 2015-02-21 23:32:00 +00:00
fkloft
597d19acfc search: pan to portal if position is off screen 2015-02-21 22:38:37 +01:00
Jon Atkins
badcdbdb18 add core functions to create a generic marker icon, of a specified colour.
use it for the new portal distance current location marker, and search result marker
2015-02-21 17:08:04 +00:00
Jon Atkins
9efc2fb508 Merge branch 'master' of https://github.com/jonatkins/ingress-intel-total-conversion 2015-02-16 19:32:02 +00:00
Jon Atkins
b22842a902 include the index 10 portal data value as unknown_10 until we know what it's used for 2015-02-16 19:30:58 +00:00
fkloft
4808f4469c [search] Better feedback when nothing can be found 2015-02-16 01:28:55 +01:00
fkloft
4d6a7df596 [iitcm] improved search 2015-02-16 01:15:52 +01:00
fkloft
f9db2c3861 [search] allow title and description to be HTML, DOM elements or jQuery objects 2015-02-14 14:51:47 +01:00
fkloft
c450aa63f8 [chat] stop further event processing once the event has been handled 2015-02-14 14:51:43 +01:00