filestack-js icon indicating copy to clipboard operation
filestack-js copied to clipboard

Bundle size

Open rtymchyk opened this issue 5 years ago • 14 comments

Are there any plans on optimizing size of the library? It's getting pretty inflated: Screen Shot 2019-10-26 at 5 22 07 PM

rtymchyk avatar Oct 26 '19 21:10 rtymchyk

Hi. Yes we have plans to lower bundle size and make it "tree-shakable"

pcholuj avatar Oct 28 '19 11:10 pcholuj

Tree-shaking would definitely help. We only use the 'transform' functionality of the library, which I imagine is tiny in comparison to the rest of the source.

rtymchyk avatar Oct 31 '19 18:10 rtymchyk

@rtymchyk does import { Client } from "filestack-js" help?

molszanski avatar Nov 15 '19 11:11 molszanski

@rtymchyk does import { Client } from "filestack-js" help?

No difference

rtymchyk avatar Nov 15 '19 12:11 rtymchyk

@molszanski @pcholuj Hate to ping again, but is there anything scheduled for either trimming the size or just introducing tree shaking?

Notice in my screenshot below, it was 1.x.x, at 31kgb gzipped. At 2.0.5 (I'm using right now) it's 45kb gzipped. An upgrade to 3.18.0, I'm looking at almost 70kb gzipped. It's slowly creeping up and I'm using just a few tiny APIs from the library.

rtymchyk avatar Oct 19 '20 16:10 rtymchyk

Yup, same here.

This is all I use:

import { Client } from "filestack-js"
this.client = new Client(conf.apiKey)

const rez = await this.client.upload(file, {}, s3StoreOptions)
const transoformUri = this.client.transform(originalFsHandle, transformation.filestackTransformOpts)
const meta = await this.client.metadata(uploaded.filestackHandle, {
      width: true,
      height: true,
      md5: true,
      mimetype: true,
    })

Feel like writing my own client atm

molszanski avatar Oct 19 '20 17:10 molszanski

Yup, same here.

This is all I use:

import { Client } from "filestack-js"
this.client = new Client(conf.apiKey)

const rez = await this.client.upload(file, {}, s3StoreOptions)
const transoformUri = this.client.transform(originalFsHandle, transformation.filestackTransformOpts)
const meta = await this.client.metadata(uploaded.filestackHandle, {
      width: true,
      height: true,
      md5: true,
      mimetype: true,
    })

Feel like writing my own client atm

Oops, sorry, for some reason I thought you were a maintainer here.

I'm using transform and picker. If it wasn't for the picker, I'd definitely just make my own utility :/

rtymchyk avatar Oct 19 '20 17:10 rtymchyk

Hi we have plans to reduce sdk size, but it can take some time. Probably in 4.x.x it will be resolved

pcholuj avatar Oct 20 '20 08:10 pcholuj

Hi we have plans to reduce sdk size, but it can take some time. Probably in 4.x.x it will be resolved

Thanks for the update!

rtymchyk avatar Oct 20 '20 12:10 rtymchyk

Bundle size seems to be growing. We are considering switching to something else with less footprint

molszanski avatar Mar 10 '21 14:03 molszanski

@pcholuj are there any updates on that? The bundle size is indeed concerning.

Orlandster avatar Jul 30 '22 11:07 Orlandster

But no rush

molszanski avatar Aug 02 '22 09:08 molszanski

Hi, sorry I`m no longer maintaining this repository.

pcholuj avatar Aug 02 '22 10:08 pcholuj

@pcholuj thanks for letting us know. Does this mean the repository is no longer maintained or is it only you who is no longer maintaining it?

Orlandster avatar Aug 02 '22 18:08 Orlandster