Giter VIP home page Giter VIP logo

Comments (3)

Waschnick avatar Waschnick commented on September 4, 2024

Hey mxhaupt,

Your question is correct and I would love to reduce the size! But it is actually not that easy to shrink it more (we tried alot, believe me), as this is already the core with only the things needed to be compliant for IAB Framework.

to explain a little bit about the size:

  • It needs to be compatible for old browser, like IE9 -> you need some polyfills for a some stuff, even Base64 encoding
  • It does contain decoding and encoding of the binary encoded consent-string of the IAB Europe TCF which in itself takes a lot of code and supports multiple cookie versions.
  • It has multiple events and formats needed for AB-Testing and a headless mode

Do you see any things where you would say this could be loaded only if needed? Maybe I worked too long on this project and can't see points where to cut. Currently I can only think about getting rid of more Polyfills, but we already tried this and it takes days and a massive amount of testing.

I think with some tweeks we can reduce the size for the next release for like 10%, but 20KB is just not possible with the current feature set. I will try to create a map of the size allocation of different features.

from oil.

mxhCodes avatar mxhCodes commented on September 4, 2024

Thank you @Waschnick for your quick response and feedback on this. Currently I have not investigated in detail yet regards what could be optimized / moved to chunks. The size allocation map could be indeed very useful.

from oil.

hypery2k avatar hypery2k commented on September 4, 2024

an option would be to split up into two NPM packages: one core for dev integration and one full for runtime easy-to-use one. I also did this with my galen nom packages here.

@Waschnick
If needed I can help on this issue

from oil.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.