[
https://issues.apache.org/jira/browse/TINKERPOP-1680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dan LaRocque updated TINKERPOP-1680:
------------------------------------
Description:
I suggest adding a backwards-compatible StarGraph builder exposing a couple
minor performance-sensitive behaviors for configuration.
Specifically:
* StarGraph calls {{String#intern}} on labels
* StarGraph calls {{Object#toString}} on ID elements when testing
element-existence-by-id
It would be nice to have the option to disable these calls in use-cases that
don't need them. Disabling the former needs no explanation; disabling the
latter would cause cases where element IDs are first {{toString}}'ed and then
{{equals}}-checked to jump straight to the {{equals}} check. The performance
gain is going to be small and bound to a narrow set of applications, but it's
nice to have the choice. It shaved about 3~5% runtime off the use case-case
that led me here (via profiling).
I already tested a local change that adds a builder while neither modifying
StarGraph's default behavior nor disturbing any of its existing
method/constructor signatures. I'll file a PR against tp32 momentarily.
was:
I suggest adding a backwards-compatible StarGraph builder exposing a couple
minor performance-sensitive behaviors for configuration.
Specifically:
* StarGraph calls {{String#intern}} on labels
* StarGraph calls {{Object#toString}} on ID elements when testing
element-existence-by-id
It would be nice to have the option to disable these calls in use-cases that
don't need them. The performance gain is going to be small and bound to a
narrow set of applications, but it's nice to have the choice. It shaved about
3~5% runtime off the use case-case that led me here (via profiling).
I already tested a local change that adds a builder while neither modifying
StarGraph's default behavior nor disturbing any of its existing
method/constructor signatures. I'll file a PR against tp32 momentarily.
> Add string performance options to StarGraph
> -------------------------------------------
>
> Key: TINKERPOP-1680
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1680
> Project: TinkerPop
> Issue Type: New Feature
> Components: structure
> Reporter: Dan LaRocque
> Priority: Minor
>
> I suggest adding a backwards-compatible StarGraph builder exposing a couple
> minor performance-sensitive behaviors for configuration.
> Specifically:
> * StarGraph calls {{String#intern}} on labels
> * StarGraph calls {{Object#toString}} on ID elements when testing
> element-existence-by-id
> It would be nice to have the option to disable these calls in use-cases that
> don't need them. Disabling the former needs no explanation; disabling the
> latter would cause cases where element IDs are first {{toString}}'ed and then
> {{equals}}-checked to jump straight to the {{equals}} check. The performance
> gain is going to be small and bound to a narrow set of applications, but it's
> nice to have the choice. It shaved about 3~5% runtime off the use case-case
> that led me here (via profiling).
> I already tested a local change that adds a builder while neither modifying
> StarGraph's default behavior nor disturbing any of its existing
> method/constructor signatures. I'll file a PR against tp32 momentarily.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)