Web Design Discussion > General Web Design Discussion

Intersecting routes on the HB

(1/7) > >>

Jim:
The highway browser on the tmtest site has a first attempt at linking to intersecting routes.  The links are in the "infowindow" that pops up when you click on a waypoint.  Any other route that includes a point with identical latitude and longitude as that waypoint will be listed.  I decided to put the links here rather than right in the list of waypoints because I didn't want to clutter up the lists, I don't want to mess around with the CSS that formats those tables, and it was a little easier to code this way.  The big problem at the moment is that the extra DB queries (one per waypoint) really slow things down.  For small routes, it's not too bad, but for long ones, the delay is unacceptably long.  And this is after I made some changes to the queries to make them about 4-5 times faster than my original attempt.  Unfortunately, my database expertise is pretty limited, and I don't know what else to try.  I'm guessing that I'll need to make some changes to the table structure itself to allow these queries to be more efficient, or to store the information about intersecting routes in some other way.

michih:
I made a test:
http://tm.teresco.org/hb/index.php?units=km&u=terescoj&r=deu.a003 (loading time: ~1s)
http://tmtest.teresco.org/hb/index.php?units=km&u=terescoj&r=deu.a003 (loading time: ~90s)

Do you check all waypoints or the waypoints of the region only?

Jim:
Yes, very slow.  There's one DB query per non-hidden waypoint in the route being displayed.  Given the current structure of the DB, I don't know a way to avoid making that many queries.  Doesn't mean there isn't one.

compdude787:
Yeah, we might want to wait on implementing this until we can figure out how to make the loading time be faster. Otherwise people are going to get extremely frustrated at how slow it's going.

Jim:
Fortunately, Google knows SQL tricks even if I don't.  Try it now.  It's fast!

Navigation

[0] Message Index

[#] Next page

Go to full version