Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite math operations so we won't use mathjs a dependency #77

Closed
mithi opened this issue Jun 21, 2020 · 2 comments · Fixed by #81
Closed

Rewrite math operations so we won't use mathjs a dependency #77

mithi opened this issue Jun 21, 2020 · 2 comments · Fixed by #81
Labels
enhancement New feature or request optimization Improving performance, efficiency of the app PRIORITY Do this first

Comments

@mithi
Copy link
Owner

mithi commented Jun 21, 2020

When we used identity from mathjs in the Linkage module, all sorts of bugs came up on mobile.
It might be better if we don't use this library at all.

@mithi mithi added enhancement New feature or request PRIORITY Do this first labels Jun 21, 2020
@mithi
Copy link
Owner Author

mithi commented Jun 21, 2020

We are using mathjs in the following four modules:

twistSolver.js

import { atan2 } from "mathjs"

Vector.js

import { multiply, transpose, index } from "mathjs"

Linkage.js

import { multiply, identity } from "mathjs"

geometry.js

import {
    sin,
    cos,
    unit,
    matrix,
    multiply,
    transpose,
    identity,
    concat,
    dotMultiply,
    ones,
    add,
} from "mathjs"

@mithi mithi added the optimization Improving performance, efficiency of the app label Jun 22, 2020
@mithi
Copy link
Owner Author

mithi commented Jun 22, 2020

Before removing mathjs

before

After removing mathjs

Screen Shot 2020-06-23 at 1 44 35 AM

Current bundle size

Screen Shot 2020-06-23 at 1 45 57 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request optimization Improving performance, efficiency of the app PRIORITY Do this first
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant