Geography : performance issue with a lot of places.
svn: r19847
This commit is contained in:
parent
4be227010d
commit
a5f44c2a14
@ -304,8 +304,10 @@ class osmGpsMap():
|
||||
"""
|
||||
Is there a place at this position ?
|
||||
"""
|
||||
found = False
|
||||
mark_selected = []
|
||||
if self.no_show_places_in_status_bar:
|
||||
return mark_selected
|
||||
found = False
|
||||
oldplace = ""
|
||||
for mark in self.places_found:
|
||||
# as we are not precise with our hand, reduce the precision
|
||||
|
@ -130,6 +130,7 @@ class GeoEvents(GeoGraphyView):
|
||||
self.sort = []
|
||||
self.generic_filter = None
|
||||
self.additional_uis.append(self.additional_ui())
|
||||
self.no_show_places_in_status_bar = False
|
||||
|
||||
def get_title(self):
|
||||
"""
|
||||
@ -281,6 +282,7 @@ class GeoEvents(GeoGraphyView):
|
||||
longitude = ""
|
||||
self.without = 0
|
||||
self.cal = config.get('preferences.calendar-format-report')
|
||||
self.no_show_places_in_status_bar = False
|
||||
|
||||
if self.generic_filter:
|
||||
events_list = self.generic_filter.apply(dbstate.db)
|
||||
@ -299,6 +301,8 @@ class GeoEvents(GeoGraphyView):
|
||||
self.sort = sorted(self.place_list,
|
||||
key=operator.itemgetter(3, 4, 6)
|
||||
)
|
||||
if self.nbmarkers > 500 : # performance issue. Is it the good value ?
|
||||
self.no_show_places_in_status_bar = True
|
||||
self._create_markers()
|
||||
|
||||
def bubble_message(self, event, lat, lon, marks):
|
||||
|
@ -129,6 +129,7 @@ class GeoFamily(GeoGraphyView):
|
||||
self.nbmarkers = 0
|
||||
self.sort = []
|
||||
self.additional_uis.append(self.additional_ui())
|
||||
self.no_show_places_in_status_bar = False
|
||||
|
||||
def get_title(self):
|
||||
"""
|
||||
|
@ -157,6 +157,7 @@ class GeoPerson(GeoGraphyView):
|
||||
self.nbmarkers = 0
|
||||
self.sort = []
|
||||
self.additional_uis.append(self.additional_ui())
|
||||
self.no_show_places_in_status_bar = False
|
||||
|
||||
def get_title(self):
|
||||
"""
|
||||
|
@ -130,6 +130,7 @@ class GeoPlaces(GeoGraphyView):
|
||||
self.sort = []
|
||||
self.generic_filter = None
|
||||
self.additional_uis.append(self.additional_ui())
|
||||
self.no_show_places_in_status_bar = False
|
||||
|
||||
def get_title(self):
|
||||
"""
|
||||
@ -239,6 +240,7 @@ class GeoPlaces(GeoGraphyView):
|
||||
self.minyear = 9999
|
||||
self.maxyear = 0
|
||||
self.without = 0
|
||||
self.no_show_places_in_status_bar = False
|
||||
latitude = ""
|
||||
longitude = ""
|
||||
# base "villes de france" : 38101 places :
|
||||
@ -268,7 +270,11 @@ class GeoPlaces(GeoGraphyView):
|
||||
)
|
||||
_LOG.debug("%s" % time.strftime(" end sort : "
|
||||
"%a %d %b %Y %H:%M:%S", time.gmtime()))
|
||||
if self.nbmarkers > 500 : # performance issue. Is it the good value ?
|
||||
self.no_show_places_in_status_bar = True
|
||||
self._create_markers()
|
||||
_LOG.debug("%s" % time.strftime(" end create_markers : "
|
||||
"%a %d %b %Y %H:%M:%S", time.gmtime()))
|
||||
|
||||
def bubble_message(self, event, lat, lon, marks):
|
||||
menu = gtk.Menu()
|
||||
|
Loading…
x
Reference in New Issue
Block a user