Skip to content

Conversation

@novaki
Copy link
Contributor

@novaki novaki commented May 8, 2015

Receiving large tables and structures required lots of memory (see #9). The reason was that the addon stored structures in plain v8::Object, created a v8::String for each property and other objects for values. Moreover, all fields of the SAP structures were converted to v8::Object properties, even they were never read.

I've used v8::ObjectTemplate to represent a SAP structure and v8::ObjectTemplate::SetNamedPropertyHandler to convert SAP structure properties to JS ones, just-in-time.

Finally, IsException() method was really slow, so we practically couldn't receive large tables through RFC. I've used v8::Value::IsNativeError() to speed up the check.

novaki added 11 commits May 4, 2015 11:51
The IsException() method was complicated, so receival of large tables
were really slow.
The SAP function handle is managed by the garbage collector, so structures
and large arrays will be able to hold reference to it.
Removed debug message.
The structures are not stored in plain objects anymore. ObjectTemplate is
utilized to convert SAP data to JS only when it is read.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant