Giter VIP home page Giter VIP logo

Comments (7)

tszpinda avatar tszpinda commented on May 22, 2024

adding transaction around it for Dexie helps a bit:

https://gist.github.com/anonymous/f37c9e6a95ceda2a529d

down to 22sec on mobile

from dexie.js.

tszpinda avatar tszpinda commented on May 22, 2024

looking at the chrome tools lots of time is wasted by this:
function fakeAutoComplete(fn) {
var to = setTimeout(fn, 1000);
clearTimeout(to);
}

can this be changed/removed/improved?

from dexie.js.

dfahlander avatar dfahlander commented on May 22, 2024

When coding with visual studio, those lines are priceless but we should have a build script that removes them in the release / minified version. I did a simple profiling of that sequence last year but came to the conclusion that they really fast in the particular browser i tested it in (probably some version of chrome, opera or ie) but did not dig so deep into it.

There is a general problem that Dexie doesn't have a build script that I hope that someone could help or with.

from dexie.js.

dfahlander avatar dfahlander commented on May 22, 2024

That piece of code is not needed and does nothing. It's just a way to improve the IDE 's code completion. Once a build script is in place (grunt, gulp or so), i'll remove those calls from the minified version.

What you can do right now, is either to remove the code in fakeautocomplete(), or to remove all calls to it. Will not affect behavior at all. Sorry I wasn't more clear in my last answer about the actual code change you could do.

from dexie.js.

dfahlander avatar dfahlander commented on May 22, 2024

The calls to setTimeout()/clearTimeout() are now removed. However, when testing performance with chrome/opera/ie/firefox, this change is not noticable. Haven't tested on safari though.

from dexie.js.

tszpinda avatar tszpinda commented on May 22, 2024

David, the difference for me was noticeable on mobile devices.

from dexie.js.

dfahlander avatar dfahlander commented on May 22, 2024

Mobile devices is a common use case for the library so hopefully this fix might improve performance a little then.

Thanks!
David

from dexie.js.

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.