Performance Issues (DOM GC / Major GC) [help]












0















I've been strugling with some performance issue related to a scroll navigation and I can't figure out how to make it smooth.



The website I'm talking about can be seen here
the script annimating the sections can be found here (Lines 96 to 120)



The script is applying to all the section a translateY of the current section number (refered by count in my code) but I need to triger other annimations when we get to the creation part, I have to know when we enter the section, when we leave and which creation is seen, That's why there is a lot of Ifs with count and oldcount, but when we enter for the first time the creation section there is a long interruption in the annimation which is (I think) caused by a "Major GC",
I tried to investigate what happend at that time (screenshot here) now, what I woud like to find is what code is causing the annimation to stop, what is trigering this DOM GC, basicly how to make my code smooth.



Thanks evryone for your time reading my post, sorry for my bad english and have a great day










share|improve this question























  • please add the relevant code parts directly to the question.

    – Jonas Wilms
    Nov 22 '18 at 13:11











  • You might want to add throttling to the mousewheel event

    – Jonas Wilms
    Nov 22 '18 at 13:15











  • Relevent part is line 96 to 120 of the script I linked, coud you give futher exeplaination of what you mean with "add throttling to the mousewheel event"

    – Leo.v
    Nov 22 '18 at 13:30











  • the "mousescroll" event triggers every few milliseconds, that is usually much faster than needed. Just ignore every second event and you effectively double performance without loosing functionality

    – Jonas Wilms
    Nov 22 '18 at 14:18











  • @JonasWilms I have that fetaure developed, kindof, in my script at the end of my function I add (and delete) an event listener to see when a section's transition ends, and then change a velue of a variable to true, if you scroll and the previous annimation isn't finished nothing is executed (That's line 41 of my script if (is_finished == 1) { So even if the event trigers more it shoudn't impact performance, right ?

    – Leo.v
    Nov 22 '18 at 14:51


















0















I've been strugling with some performance issue related to a scroll navigation and I can't figure out how to make it smooth.



The website I'm talking about can be seen here
the script annimating the sections can be found here (Lines 96 to 120)



The script is applying to all the section a translateY of the current section number (refered by count in my code) but I need to triger other annimations when we get to the creation part, I have to know when we enter the section, when we leave and which creation is seen, That's why there is a lot of Ifs with count and oldcount, but when we enter for the first time the creation section there is a long interruption in the annimation which is (I think) caused by a "Major GC",
I tried to investigate what happend at that time (screenshot here) now, what I woud like to find is what code is causing the annimation to stop, what is trigering this DOM GC, basicly how to make my code smooth.



Thanks evryone for your time reading my post, sorry for my bad english and have a great day










share|improve this question























  • please add the relevant code parts directly to the question.

    – Jonas Wilms
    Nov 22 '18 at 13:11











  • You might want to add throttling to the mousewheel event

    – Jonas Wilms
    Nov 22 '18 at 13:15











  • Relevent part is line 96 to 120 of the script I linked, coud you give futher exeplaination of what you mean with "add throttling to the mousewheel event"

    – Leo.v
    Nov 22 '18 at 13:30











  • the "mousescroll" event triggers every few milliseconds, that is usually much faster than needed. Just ignore every second event and you effectively double performance without loosing functionality

    – Jonas Wilms
    Nov 22 '18 at 14:18











  • @JonasWilms I have that fetaure developed, kindof, in my script at the end of my function I add (and delete) an event listener to see when a section's transition ends, and then change a velue of a variable to true, if you scroll and the previous annimation isn't finished nothing is executed (That's line 41 of my script if (is_finished == 1) { So even if the event trigers more it shoudn't impact performance, right ?

    – Leo.v
    Nov 22 '18 at 14:51
















0












0








0








I've been strugling with some performance issue related to a scroll navigation and I can't figure out how to make it smooth.



The website I'm talking about can be seen here
the script annimating the sections can be found here (Lines 96 to 120)



The script is applying to all the section a translateY of the current section number (refered by count in my code) but I need to triger other annimations when we get to the creation part, I have to know when we enter the section, when we leave and which creation is seen, That's why there is a lot of Ifs with count and oldcount, but when we enter for the first time the creation section there is a long interruption in the annimation which is (I think) caused by a "Major GC",
I tried to investigate what happend at that time (screenshot here) now, what I woud like to find is what code is causing the annimation to stop, what is trigering this DOM GC, basicly how to make my code smooth.



Thanks evryone for your time reading my post, sorry for my bad english and have a great day










share|improve this question














I've been strugling with some performance issue related to a scroll navigation and I can't figure out how to make it smooth.



The website I'm talking about can be seen here
the script annimating the sections can be found here (Lines 96 to 120)



The script is applying to all the section a translateY of the current section number (refered by count in my code) but I need to triger other annimations when we get to the creation part, I have to know when we enter the section, when we leave and which creation is seen, That's why there is a lot of Ifs with count and oldcount, but when we enter for the first time the creation section there is a long interruption in the annimation which is (I think) caused by a "Major GC",
I tried to investigate what happend at that time (screenshot here) now, what I woud like to find is what code is causing the annimation to stop, what is trigering this DOM GC, basicly how to make my code smooth.



Thanks evryone for your time reading my post, sorry for my bad english and have a great day







javascript garbage-collection






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Nov 22 '18 at 13:03









Leo.vLeo.v

1




1













  • please add the relevant code parts directly to the question.

    – Jonas Wilms
    Nov 22 '18 at 13:11











  • You might want to add throttling to the mousewheel event

    – Jonas Wilms
    Nov 22 '18 at 13:15











  • Relevent part is line 96 to 120 of the script I linked, coud you give futher exeplaination of what you mean with "add throttling to the mousewheel event"

    – Leo.v
    Nov 22 '18 at 13:30











  • the "mousescroll" event triggers every few milliseconds, that is usually much faster than needed. Just ignore every second event and you effectively double performance without loosing functionality

    – Jonas Wilms
    Nov 22 '18 at 14:18











  • @JonasWilms I have that fetaure developed, kindof, in my script at the end of my function I add (and delete) an event listener to see when a section's transition ends, and then change a velue of a variable to true, if you scroll and the previous annimation isn't finished nothing is executed (That's line 41 of my script if (is_finished == 1) { So even if the event trigers more it shoudn't impact performance, right ?

    – Leo.v
    Nov 22 '18 at 14:51





















  • please add the relevant code parts directly to the question.

    – Jonas Wilms
    Nov 22 '18 at 13:11











  • You might want to add throttling to the mousewheel event

    – Jonas Wilms
    Nov 22 '18 at 13:15











  • Relevent part is line 96 to 120 of the script I linked, coud you give futher exeplaination of what you mean with "add throttling to the mousewheel event"

    – Leo.v
    Nov 22 '18 at 13:30











  • the "mousescroll" event triggers every few milliseconds, that is usually much faster than needed. Just ignore every second event and you effectively double performance without loosing functionality

    – Jonas Wilms
    Nov 22 '18 at 14:18











  • @JonasWilms I have that fetaure developed, kindof, in my script at the end of my function I add (and delete) an event listener to see when a section's transition ends, and then change a velue of a variable to true, if you scroll and the previous annimation isn't finished nothing is executed (That's line 41 of my script if (is_finished == 1) { So even if the event trigers more it shoudn't impact performance, right ?

    – Leo.v
    Nov 22 '18 at 14:51



















please add the relevant code parts directly to the question.

– Jonas Wilms
Nov 22 '18 at 13:11





please add the relevant code parts directly to the question.

– Jonas Wilms
Nov 22 '18 at 13:11













You might want to add throttling to the mousewheel event

– Jonas Wilms
Nov 22 '18 at 13:15





You might want to add throttling to the mousewheel event

– Jonas Wilms
Nov 22 '18 at 13:15













Relevent part is line 96 to 120 of the script I linked, coud you give futher exeplaination of what you mean with "add throttling to the mousewheel event"

– Leo.v
Nov 22 '18 at 13:30





Relevent part is line 96 to 120 of the script I linked, coud you give futher exeplaination of what you mean with "add throttling to the mousewheel event"

– Leo.v
Nov 22 '18 at 13:30













the "mousescroll" event triggers every few milliseconds, that is usually much faster than needed. Just ignore every second event and you effectively double performance without loosing functionality

– Jonas Wilms
Nov 22 '18 at 14:18





the "mousescroll" event triggers every few milliseconds, that is usually much faster than needed. Just ignore every second event and you effectively double performance without loosing functionality

– Jonas Wilms
Nov 22 '18 at 14:18













@JonasWilms I have that fetaure developed, kindof, in my script at the end of my function I add (and delete) an event listener to see when a section's transition ends, and then change a velue of a variable to true, if you scroll and the previous annimation isn't finished nothing is executed (That's line 41 of my script if (is_finished == 1) { So even if the event trigers more it shoudn't impact performance, right ?

– Leo.v
Nov 22 '18 at 14:51







@JonasWilms I have that fetaure developed, kindof, in my script at the end of my function I add (and delete) an event listener to see when a section's transition ends, and then change a velue of a variable to true, if you scroll and the previous annimation isn't finished nothing is executed (That's line 41 of my script if (is_finished == 1) { So even if the event trigers more it shoudn't impact performance, right ?

– Leo.v
Nov 22 '18 at 14:51














0






active

oldest

votes











Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431664%2fperformance-issues-dom-gc-major-gc-help%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53431664%2fperformance-issues-dom-gc-major-gc-help%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

404 Error Contact Form 7 ajax form submitting

How to know if a Active Directory user can login interactively

TypeError: fit_transform() missing 1 required positional argument: 'X'