Skip to content

vtzero::convert_property_value inside worker #82

@mapsam

Description

@mapsam

The set_property method does some variant decoding in the main thread while constructing the final JSON object to return to node. This, in theory, could happen within the worker threads before being handled in the callback, and increase performance.

vtquery/src/vtquery.cpp

Lines 154 to 160 in 95ab347

/// used to create the final v8 (JSON) object to return to the user
void set_property(vtzero::property const& property,
v8::Local<v8::Object>& properties_obj) {
auto val = vtzero::convert_property_value<mapbox::feature::value, mapbox::vector_tile::detail::property_value_mapping>(property.value());
mapbox::util::apply_visitor(property_value_visitor{properties_obj, std::string(property.key())}, val);
}

cc @springmeyer @flippmoke

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions