Giter Site home page Giter Site logo

Comments (4)

wimbarelds avatar wimbarelds commented on July 19, 2024

Hey there,

Could you tell me what performance issues you're seeing?

from timecircles.

linuxism avatar linuxism commented on July 19, 2024

Hi,
Below is my javascript code:

<script src="/resources/js/timeCircles.js"></script> <script src="/resources/js/moment.min.js"></script>

moment(pastTime);
$("#example").attr("data-date", moment.format("YYYY-MM-DD HH:mm:ss"));
$("#example").TimeCircles({
time: {
Days: {show: false},
Hours: {show: false},
Minutes: {color: "#86d0f5", text: ""},
Seconds: {show: false}
},
circle_bg_color: "#eee",
start_angle: (0.5 * (moment.hours() * 60 + moment.minutes())),
fg_width: 0.2,
animation: "smooth",
total_duration: 43200
});

I think that cpu load is slightly higher than "ticks" animation option.
Thanks for your help.

from timecircles.

wimbarelds avatar wimbarelds commented on July 19, 2024

Hi again, thanks for the sample code. (It's nice to see people using some of the more obscure options, like start_angle)

It is correct/expected that the CPU load is higher when set to smooth, because when it's set to ticks it will actually do nothing for a while each second-- whereas with smooth it actually updates the canvas with each frame the browser draws.

Is the cpu usage you're seeing problematically high? If so, how high does it get and what specs are you running on? I don't really have anything really old laying around, my phone is a nexus 5 and runs it fine...But a nexus 5 is admittedly fairly fast.

from timecircles.

linuxism avatar linuxism commented on July 19, 2024

Hi,
Thank you very much for your answer.

CPU usage is not the problem. I think it's fine.
For reference, Below is my laptop specification:
CPU : Intel® Core™ i5-2450M CPU @ 2.50GHz × 4
Memory : 4G

It seems there is another problem.
stop() function does not work in the "ticks" animation option.

So instead of used following it.
$("#example").TimeCircles({animation: "smooth"}).rebuild().stop();

Thank you.

from timecircles.

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.