Location Import Process Improved With Power 4.9

With the release of the WordPress plugins version 4.9 of Store Locator Plus and the Power add on we focused on improving the location import process for large lists.      MySLP Power users will see this release by the end of the year after it has passed full testing on our SaaS platform.

Why Did We Change The Process?

Prior to version 4.9 there were a number of limitations that could prevent larger lists of locations from importing properly.    For the fastest servers with lots of memory and super-fast networking as well as a premium tier on the Google API service, Store Locator Plus could import 40,000 locations without any problem.

As WordPress started adding more network overhead, all those update notifications and the news feed in the WordPress dashboard comes from somewhere, the network started to become an issue.   On top of that Google started tracking every single map request so they could start charging people using their maps on a per-lookup basis.     Both of these changes increased the network traffic, slowing down how quickly Store Locator Plus could get a latitude/longitude for those new locations being imported.

Often your server would give up, saying “you had your 30 seconds of my time” and stopping the import mid-stream.    The PHP time limitation on processing is often the first thing that “gives out” when importing large lists of locations.   For most shared hosts the limit is 30 seconds.   Even on a dedicated host it is good practice to not let a PHP process consume more than 120 seconds of CPU time.  This prevents “runaway” processes that take over the entire server which can grind EVERYTHING to a halt forcing a server restart.

The bad news is that if you are importing 10,000 locations and the process gives up after 9,800 locations you have to start over.   At least that is how it USED TO BE with SLP 4.8 and earlier.

How Imports Improved In Power 4.9

With version 4.8 the location import process was “tied to the browser” until it was complete.    When you clicked the “upload CSV” button your browser would sit there attached to the website while the file was uploaded, read line-by-line, each location sent to Google to get a latitude and longitude and then get added to the Store Locator Plus locations list.     If the network was slow this could take a long time, often 10 minutes or more.   That is FOREVER to keep a browser window open these days.

With Power 4.9 we split this process into 3 stages.

Stage 1 : Get The File On The server

This is the only step of the process that stays “attached to your browser”.    The browser will bar processing the page while the file is copied from your laptop to the web server.   This is typically a quick process even for a file with 250,000 locations.    The time it takes depends on how fast your local network and ISP connection is.

Previous versions stored  the uploaded location files in a “hidden” SLP-specific directory under WordPress uploads.   Version 4.9 stores them in the media library.     This gives you an easy way to see that the file was uploaded properly, see what the current import state is, and later download or delete the files when the import is complete.

Stage 2 : Import The Locations Into SLP

After the file is uploaded a detached process starts to work on the actual location import. This ensures your browser doesn’t time out as this part happens in the background.    Your browser is “free to go” while your server does the work of loading in the locations.

It runs a WP Cron job in the background to import the locations WITHOUT geocoding. This is much faster and ensures the import doesn’t disconnect partway through.

As part of improving visibility into this process, Power 4.9.1 will be out soon and will be included in our end-of-year MySLP update.  It includes a cool interactive progress bar as well showing you how many records have been read.

Power 4.9.2 Import Processing Progress
Power 4.9.2 Import Processing Progress Bar

If your server times out before our background location loader finishes reading the file , SLP remembers the last record read and re-spawns a new background job to pick up where it left off. It will do this until it reaches the end of the file no matter how often PHP times out.

Stage 3: Geocode The Locations

AFTER the file has been loaded it will then geocode all uncoded locations.   That means you may catch SLP with a list of locations none of which are geocoded and not showing up on the map.  This is a temporary state while SLP talks to Google.    Since that is always the slowest part of an import we decided to do this in a separate process so at least SOME locations start showing up right away and eventually of them are loaded.

Power 4.9.2 Geocoding Progress
Power 4.9.2 Geocoding Progress

This is similar to the import. It does it in the background and if PHP times out it will re-spawn itself until it has tried to geocode very location at least once. This is a big step toward not having an import time out. It also keeps you from manually having to re-geocode if you hit your daily 2500 location limit and didn’t opt for a paid API key.

Store Locator Plus and WordPress 4.9.1 Updates

It has been a busy week for WordPress and all the updates and patches going around.    For those on our MySLP managed service, sit back and relax.  You’re good.    While you may wait a little longer for some new features and a couple of minor patches you are not going to be affected by software updates.   You’re good.

For WordPress users we’ve been busy chasing down some notable functionality issues with Store Locator Plus and the Add Ons for WordPress since WordPress 4.9 and 4.9.1 hit the update queue on your sites.

Google Maps

Google Maps is the most prevalent map service available today.   Their routine updates to the public website constantly adds new features that go well beyond “where is this place?”.  The reason they have become the go-to map service lies elsewhere.   Their application program interfaces (APIs), the language that apps use to talk to each other, have pushed Google into a majority of website and mobile apps.   One of our favorite things about Google Maps is the fun, and sometimes useful, lesser-known features of the service.

Google Maps marketing site
Google Maps marketing site, October 2017

Lesser Known Features

While most people know about Google Maps and use it frequently for doing searches for “pizza near me”, one of the most-searched phrases for 5 years running, there are a lot of cool and fun things going on in the Google Maps world.  Sometimes, while in the middle of hacking up our own maps software for MySLP and WPSLP, we get sidetracked discovering one of the many tidbits Google leaves lying around.   We find some of these side trips most interesting such as exploring planets, checking out 3D views of Earth, and zooming in on  satellite view in our own mini-version of “What On Earth?”.

Maps Of Space

Yes, you can even explore space with Google Maps.  There are plenty of cool places they’ve mapped with a little help from NASA and international space agencies.    One of our favorites includes the International Space Station with its 360-degree view from inside one of the pods.   How cool is that?

Google Maps view from the International Space Station
Google Maps view from the International Space Station (ISS)

Some of the other places on the Google Maps “Interplanetary Exploration” list include Venus, Mars, and Europa.   You’ll find a half-dozen planets and a dozen moons or other extra-terrestrial objects  on the list.   We’re anticipating Google will add driving directions to these places in another decade-or-two, once Elon Musk gets SpaceX on routine runs back-and-forth to Mars.

Time Travel With Google Maps

Another lesser-known feature of Google Maps is the ability to see how a place changed over time.   The feature, dubbed “Time Travel” by some Google insiders, is available in Street View mode.    Open Google Maps, and drag “stick man” onto the map to get a street-level view of the area.    For places on the map that have a historical record of photos available to Google you will see a clock icon that allows you to view the location in the past.

 

Google Maps Time Travel
Google Maps Time Travel feature.

You’ll find Time Travel for the Freedom Tower in New York City, Onagawa Japan,the World Cup Stadium in Brazil ,as well as  the roads of Emilia in Italy.   I was personally hoping for a time machine of Machu Picchu, but no such luck.  However, you can check out some great views of Machu Picchu today.

Haunted Houses

Another cool find, fitting for an October post, is Google’s list of Most Haunted Places In America.   Apparently if you are afraid of ghosts, the Northwest is a great place to relocate.  If you’re going out trick-or-treating this year these are some places you may want to avoid, or go out-of-your-way to visit, depending on how adventurous your spirit is.  We were hoping to see photos of these places on Google Maps, but apparently that has not been added yet.     Maybe in a future version.

Have some favorite features you’d like to share?  Let us know!