[Cartoweb-dev] urgent: pgdijkstra hacking (caching source connectivity)

Hugo Ferreira bytter at gmail.com
Fri Feb 24 12:45:31 EST 2006


Good day,

Currently I have an "heavy" problem with pgdijkstra... My routing tables has
about 0.8 million rows. While pgdijkstra is able to find a route within it
very quickly (hail to libboost :)), the loading of this 0.8 million rows
takes about 30seconds on my 2xXEON with SCSI.

Therefore, I want to hack the source code to maintain a sort of cache. If we
do a SELECT * FROM ROUTING in the past, and we're passing a boolean that
says "use the cache if u done this query previously", then there's no need
to reload the data from postgresql but use the already loaded data in the
memory.

I have two problems here:

a) I don't know how postgresql handles external calls. But if data is
maintained between calls, then this would be very easy to implement. I could
even make some functions like cache_data(query, id) and uncache_data(id),
and then make a cached_shortest_path(id, ...);

b) I can't compile pgdijkstra under windows. I know, i know.. But my
deployment machine is a windows station so this IS a requirement...
Basically I've installed cygin and I have mingw from dev-c++. But when I try
to compile I get the following errors:

C:\pgdijkstra>g++ -o2 -Ie:\cygwin\usr\include\boost-1_33_1 -c
boost_wrapper.cpp
In file included from
e:\cygwin\usr\include\boost-1_33_1\boost\config.hpp:40,
                 from boost_wrapper.cpp:22:
e:\cygwin\usr\include\boost-1_33_1\boost\config\select_stdlib_config.hpp:20:
uti
lity: No such file or directory
boost_wrapper.cpp:23: iostream: No such file or directory
boost_wrapper.cpp:24: fstream: No such file or directory
In file included from boost_wrapper.cpp:26:
e:\cygwin\usr\include\boost-1_33_1\boost\graph\graph_traits.hpp:14:
iterator: No
 such file or directory
(...)

I think this must have something to do with the slash and reverse-slash
notation... Any ideas??

I would appreciate any tips on this, since I need to get it done over this
weekend. If it works, I will submit the patch for you guys to consider using
it.

Thanks in advance,

Hugo Ferreira

--
GPG Fingerprint: B0D7 1249 447D F5BB 22C5  5B9B 078C 2615 504B 7B85
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-dev/attachments/20060224/7d9f7eac/attachment.html


More information about the Cartoweb-dev mailing list