Skip to content
This repository was archived by the owner on Jun 13, 2019. It is now read-only.
This repository was archived by the owner on Jun 13, 2019. It is now read-only.

Requiring iotivity-node takes ~2 seconds #153

@johnandersen777

Description

@johnandersen777

iotivity-node takes ~2 seconds to load because of the iotivity.OCInit call in csdk.js

Require takes ~2 seconds

This is from 01org/iot-rest-api-server/handlers/ocfHandler.js

var startDate = new Date();
var DEV = require('iotivity-node').client;
console.log('iotivity-node:', (new Date()) - startDate); startDate = new Date();

iotivity.OCInit call

stackOKOrThrow( iotivity.OCInit( null, 0, iotivity.OCMode.OC_CLIENT_SERVER ), "OCInit() failed" );

This takes ~2 seconds to load. Maybe this can't be avoided but if we have an issue for it maybe someone will know why or how to speed it up. Seems suspiciously slow to me.

iotivity issue: https://jira.iotivity.org/browse/IOT-2717

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions