1125 Commits

Author SHA1 Message Date
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
fkloft
6533dd5d0d [search] show outline and icon from nominatim 2015-02-14 14:51:36 +01:00
fkloft
a70bcc1df1 search: add details for portals 2015-02-12 17:11:51 +01:00
fkloft
5c35cda7b4 uniform strings 2015-02-12 16:06:48 +01:00
fkloft
46a1684549 Search for portals: select portal on click 2015-02-12 16:06:48 +01:00
fkloft
6b027d15fe Small fix in search logic 2015-02-12 16:06:48 +01:00
fkloft
6ae79ca50b set max-height for search results 2015-02-12 16:06:48 +01:00
fkloft
d98737b3ba add icon to search results 2015-02-12 16:06:48 +01:00
fkloft
4c7b8e0e70 new search 2015-02-12 16:06:48 +01:00
fkloft
7fd88dd1e3 Revert "search: draw a marker highlighting search results (rectangle for region, 10px circle for point)"
This reverts commit 39e4608c4e1ce8f221af2c70da3d6396cc370262.
2015-02-12 16:06:20 +01:00
Jon Atkins
1ac5158dcf remove raw from portal details - not something best to encourage access to
comments concerning new data[10] index in map data
2015-02-11 23:05:08 +00:00
Jon Atkins
39e4608c4e search: draw a marker highlighting search results (rectangle for region, 10px circle for point) 2015-02-11 23:04:08 +00:00
Jon Atkins
1cc39a099c Merge pull request #922 from Fragger/latlng-geosearch
Don't do ajax lookup when search is lat/lng cords
2015-02-11 17:18:57 +00:00
Jon Atkins
6fc7bbe4df typo - fix #944 2015-02-09 18:42:59 +00:00
fkloft
57fc2295b3 Fix error in botguard detection
access to top.opener would throw a SecurityError if opened from intel link.
2015-02-07 18:25:40 +01:00
Jon Atkins
423c8043a6 restore the 'confirm' prompt on server-supplied javascript to execute
i have some minor concerns about some of the code changes in the 6th Feb 2015 stock site update, so may be better left in for now
fixes (kinda) #941
2015-02-07 00:09:57 +00:00
Jon Atkins
f3f7a04c4b tweak show-less-portals plugin - show L5 when L4 would by default be in view - jumping straight to L6 was too much
levels L5 to L7 are all one higher (L6 to L8) as before
2015-02-06 22:21:44 +00:00
Jon Atkins
7cc8480467 botguard groups: rather than emulating the now removed group_a_methods array, we create an object containing the a/b flag
this way, if a method isn't found - we correctly fail to send a request, rather than falling back to assuming it's group-b
2015-02-06 21:53:56 +00:00
fkloft
39de236459 fix: portal detail format changed 2015-02-06 21:42:31 +01:00
fkloft
f619911a98 first try at cathcing up with latest stock changes 2015-02-06 21:33:18 +01:00
Jon Atkins
b029da632f portal mod stats: convert the new large removal stickiness values to a percentage. there's no confirmation from Niantic this is what it means, and unlikely to ever be any exapanation, but it folows the convention used for other high value mod stats
low values (<=100) are displayed as-is, for existing portals. it's unknown how the backend servers actually handle a mix of old and new mods
2015-02-04 14:51:36 +00:00
Jon Atkins
0063646156 iitc botguard interface: i've had a chance to test a real-world case of the server asking the client to run a script, which is when it switches to a new key
seems OK, so remove the user prompt - it will break badly if declined. logging remains, to help diagnose issues
also fix silly typo that prevented it from actually working right :)
2015-02-02 17:29:01 +00:00