• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Performance issue with javafx 2.2 webview and openlayers.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Team,
i am running javafx 2.2 from jdk7u21.
openlayers version used is 2.12
when i am trying to add a huge number of vectors to a vector layer, the CPU usage goes high and nothing gets displayed.
Most of the CPU usage is done by com.sun.javafx.sg.prism.NGWebView.update()
it works well till around 4K vectors, but goes for a toss beyond that.

OpenLayers Code is as follows.
vector layer Definition
==============
var vector1= new OpenLayers.Layer.Vector("Drivers",{
styleMap: new OpenLayers.StyleMap({
"default": new OpenLayers.Style(OpenLayers.Util.applyDefaults({
pointRadius: 3,
fillColor : "blue",
graphicName : "circle",
fillOpacity : 1
}, OpenLayers.Feature.Vector.style["default"])),
"select": new OpenLayers.Style({
externalGraphic: "${select_externalGraphic}"
})
})
});
vector1.events.on({
"featureselected": function(e) {
//TODO: on Selection
app.printOnConsole("From Vector Event>>"+e.feature.attributes.name);
app.printOnConsole("From Vector Event"+Object.toJSON(e.feature.attributes));
},
"featureunselected": function(e) {
//TODO: on Deslect:
}
});

Adding the vector code
===============
var mymarker = new OpenLayers.Feature.Vector(
new OpenLayers.Geometry.Point(LON,LAT),{
default_externalGraphic: 'triangle_8.png',
select_externalGraphic: 'triangle_8.png',
rat : jsonObj.rat
}
);
mylayer.addFeatures([mymarker]);

Please suggest if there is a way i can fine tune my code to display the vectors.
 
Rancher
Posts: 387
30
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
BeForthrightWhenCrossPostingToOtherSites

See Oracle JavaFX forum: Thread: Performance issue using WebView and OpenLayers
 
reply
    Bookmark Topic Watch Topic
  • New Topic