Skip to content

Distributed module file sizes for react-sdk and optimizely-sdk are large #352

Open
@twalker

Description

@twalker

The following modules are pretty large in filesize, and it'd be great to have them reduced:

@optimizely/react-sdk@0.3.0-beta1
132kB minified

optimizely-sdk@3.2.1
114kB minified

This has a notable performance impact for consumers of the modules (like me), and their end users. 244k adds over 1 second of download time (3G) and delays user interactivity.
The file size is also high in comparison with other libraries used by web apps. For example redux = 7.2kB, all of lodash = 69.2kB, vue = 63.5kB, etc.

It'd be fantastic if the bundle sizes could be reduced dramatically, down to < 50k combined.

A couple clues I'd noticed that may be useful for optimizing the size:

  1. There was a large size increase for react-sdk from 0.2.0-beta1 (11kB) to 0.3.0-beta1 (132kB)
  2. The logging strings add a lot to the file size.

@optimizely/optimizely-sdk version: 3.2.1
@optimizely/react-sdk@0.3.0-beta1 version: 0.3.0-beta1

Browser and version:

node version: 10.16.0
npm version: 6.9.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions