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

Perfomance issue onLoad on "larger" page #248

Open
p10tyr opened this issue Oct 28, 2015 · 4 comments
Open

Perfomance issue onLoad on "larger" page #248

p10tyr opened this issue Oct 28, 2015 · 4 comments

Comments

@p10tyr
Copy link

p10tyr commented Oct 28, 2015

I have a page load with a table, in the morning its about 40 elements, towards the end of the day it grows to 200.

I have other scripts running there but I tracked down that timeago "blocks" the page until all the elements are updated... 👎

"blocks" - Cannot scroll the page or click on any element for 1-3 seconds

I think some optimization may be required as the main page does not mention any limits.

This page could potentially shows thousands of rows with timago applied

Sameple of single row

HTML (after run)

<td data-order="10/28/2015 12:42:31" data-search="10/28/2015 12:42:31" class="sorting_1">
  <abbr class="timeago" title="October 28, 2015 - 12:42:31">9 minutes ago</abbr>
</td>

Server C#

<abbr class="timeago" title="@ex.DateTime.ToString("yyyy-MM-ddTHH:mm:ssZ")">@ex.DateTime.ToString("MMMM dd, yyyy - HH:mm:ss")</abbr>

On this occasion you can see Chrome reports 1.3 seconds but there is still the update dom afterwards I think. (the monitor shows along time, im debugging so it takes long to start but afterwards it runs as normal)

74 rows @ 1.3 seconds ?

image

@rmm5t
Copy link
Owner

rmm5t commented Oct 30, 2015

It sounds like this is a dynamically updating page. Is it possible that this page is repeatedly/recursively calling timeago on the same elements over and over again?

@p10tyr
Copy link
Author

p10tyr commented Oct 30, 2015

No. I load the table Dom then on load the plugin. Afterwards not again,
ever.

On Fri, 30 Oct 2015 at 20:46, Ryan McGeary notifications@github.com wrote:

It sounds like this is a dynamically updating page. Is it possible that
this page is repeatedly/recursively calling timeago on the same elements
over and over again?


Reply to this email directly or view it on GitHub
#248 (comment)
.

@rmm5t
Copy link
Owner

rmm5t commented Oct 31, 2015

in the morning its about 40 elements, towards the end of the day it grows to 200.

No. I load the table Dom then on load the plugin.

This is a bit cryptic. If you're manually loading a table DOM, I don't understand how "no" is the answer to whether you're dynamically updating the page DOM?

@p10tyr
Copy link
Author

p10tyr commented Oct 31, 2015

During the day the result set grows. The html is built in each refresh. No
Ajax is used. So early there's few rows later up to 200rows in table. It's
manual refresh only.

On Sat, 31 Oct 2015 at 00:32, Ryan McGeary notifications@github.com wrote:

in the morning its about 40 elements, towards the end of the day it grows
to 200.

No. I load the table Dom then on load the plugin.

This is a bit cryptic. If you're manually loading a table DOM, I don't
understand how "no" is the answer to whether you're dynamically
updating the page DOM?


Reply to this email directly or view it on GitHub
#248 (comment)
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants