[fusion-users] Query.php performance issues.

Tómas Guðmundsson tomas at snertill.is
Mon Jul 14 10:10:12 EDT 2008


Hi zac.

Ok. But the thing I found that slowed things down was that Query was in fact executed 30 times. It has a HUGE for loop that reads and parses xml for every layer and is in my opinion poorly constructed. If it is the only way then we must take another route. One way is by NOT selecting every layer as is done in Select.js, options.layers parameter for the query remains null and results in unintuitive behavior.

If I click on a house on my map, the land / property underneath it get's selected as well. What we have realized is that it is completely redundant searching for a feature and selecting it when it is obvious there is no layer beneath it. Why would I want to spend resources searching in a layer called "streets" when I click on an area that looks like "water"?

Pseudo code like this needs to be implemented:

 Have point P where clicked
  What layers exist on this point.
   Which of them are selectable.
    Which of them are visible.
     What one is hierarchically the topmost one.
	Select that one.

It is kind of a weird thing just selecting everything once a point is clicked. I think it would benefit the whole Fusion community if this would be solved and we here in Snertill are working on it as we speak, hopefully finding a solution.

Kind regards,
Tómas.

-----Original Message-----
From: Zac Spitzer [mailto:zac.spitzer at gmail.com] 
Sent: 14. júlí 2008 10:43
To: Tómas Guðmundsson
Cc: fusion-users at lists.osgeo.org
Subject: Re: [fusion-users] Query.php performance issues.

>Is it feasible to pump all the data from the map into a sql server
> and query that instead?

yep, I think that SDF's don't have indexes and involve a full table
scan where as your db server does

z


-- 
Zac Spitzer -
http://zacster.blogspot.com (My Blog)
+61 405 847 168


More information about the fusion-users mailing list