smallAreaHealthStatisticsUnit / rapidInquiryFacility

The Rapid Inquiry Facility (RIF) helps epidemiologists and public health researchers in environmental health activities.
GNU Lesser General Public License v3.0
14 stars 5 forks source link

Risk Analysis selection at high resolution (e.g. MSOA) does not perform acceptably #78

Open peterhambly opened 6 years ago

peterhambly commented 6 years ago

Risk Analysis selection at high resolution (e.g. MSOA) does not perform acceptably. Remove layer triggers, may need conventional tiles. Issue #66 mouse click through via squares may also help.

peterhambly commented 6 years ago

Performance to load 28 COMARE nuclear installation sites at 5Km and 25Km:

Geo Level Load from file Intersect Selected areas
MSOA (Ward) 6.8s 15.5s 2,040/8,480
LSOA 21s 43.4s 10,124/41,729
COA 177.2s 203.5s 54,998/227,750

Most browsers (e.g. Opera, Chrome) except IE11 will work to LS0A level; at COA level the size of the browser process will exceed 3GB and this will crash any not fully 64 bit. The only ones currently known to work are Firefox and Edge.

Edge crashes restoring COA COMARE test study but can create intersects. Attempts to fix by reorder the code failed; it crashes soon after loading COA GeoJSON tiles;

Faulting application name: MicrosoftEdgeCP.exe, version: 11.0.17134.48, time stamp: 0x5ae3f17b
Faulting module name: EdgeContent.dll, version: 11.0.17134.285, time stamp: 0x9a1d5114
Exception code: 0xc0000409
Fault offset: 0x00000000000af52a
Faulting process id: 0x74fc
Faulting application start time: 0x01d452523afd7278
Faulting application path: C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\MicrosoftEdgeCP.exe
Faulting module path: C:\WINDOWS\SYSTEM32\EdgeContent.dll
Report Id: dbb8cbb2-4628-4664-b135-b5a4f803f5b7
Faulting package full name: Microsoft.MicrosoftEdge_42.17134.1.0_neutral__8wekyb3d8bbwe
Faulting package-relative application ID: ContentProcess

How disable annoying message A web page is slowing down your browser in Firefox::

peterhambly commented 6 years ago

The current patch is an acceptable temporary solution.

The proposed solution to high memory usage in high resolution risk analysis studies is not convert the GeoJSON tiles to PNG tiles in the Java middleware using the Geotools library used for the maps: (https://gis.stackexchange.com/questions/245875/convert-geojson-to-pnghttps://gis.stackexchange.com/questions/245875/convert-geojson-to-png). The tile background would need to be transparent and the tile "clipped" to the correct pixel size. If this is not feasible then another route is via Maptools vector (mvt) tiles using node; the tilemaker would be extended to produce the PNG tiles.

It is probably not possible to generate Java middleware tiles on the fly; Node tiles would need to be pre-generated.

Because even a large study like COMARE uses only 24% of the tiles at COA level the TopoJSONGridLayer would be enhanced to have an area_id inclusion list; so only the shapes selected for the study would be loaded. This would reduce the memory load by 75% and allow use of postcode centroid geography and minimize the impact on the existing code.

This code would be enabled if the number of areas in the geolevel exceeds 5,000 as in the mouse click reduction code.