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

Scrolling on real devices extremely laggy/slow #191

Closed
Ahmadre opened this issue Nov 24, 2019 · 12 comments
Closed

Scrolling on real devices extremely laggy/slow #191

Ahmadre opened this issue Nov 24, 2019 · 12 comments
Labels
more-info-needed More information is needed to resolve the issue. Will be closed if no response is received.

Comments

@Ahmadre
Copy link

Ahmadre commented Nov 24, 2019

When I run my app in the simulator/emulator the scrolling with SingleChildScrollView is fast, but when i build an release app and run it on my real device it's lagging extremly! why?

related snippet:

SafeArea(
    bottom: false,
        child: SingleChildScrollView(
            controller: _scrollController,
                child: ConstrainedBox(
                    constraints: BoxConstraints(maxWidth: 680),
                    child: Html(
                        padding: EdgeInsets.all(16),
                        onLinkTap: (url) async {
                            if (await canLaunch(url)) {
                                await launch(url);
                            }
                        },
                       data: markdownToHtml(
                           MetaData.myMarkdown(context)),
                       ),
                  ),
            )
)
@Sub6Resources
Copy link
Owner

There are many possible issues, so it's hard to say. What device are you using? Is the HTML complex? Are you running lots of apps on your device? This could even be an issue with Flutter's performance.

@Sub6Resources Sub6Resources added the more-info-needed More information is needed to resolve the issue. Will be closed if no response is received. label Dec 12, 2019
@Ahmadre Ahmadre closed this as completed Dec 13, 2019
@cuongloveit
Copy link

cuongloveit commented Feb 13, 2020

I have a same issue.

<p>Để cải thiện vấn đề sắp xếp task, triển khai c&ocirc;ng việc &amp; &yacute; tưởng mới. Hỗ trợ lead v&agrave; PM trong việc đ&aacute;nh gi&aacute; t&igrave;nh h&igrave;nh assign c&ocirc;ng việc v&agrave; l&ecirc;n kế hoạch kế tiếp.</p>

<p>Từ th&aacute;ng 2/2020, TEQ sẽ &aacute;p dụng Heatmap để monitor t&igrave;nh h&igrave;nh c&ocirc;ng việc của tất cả member một c&aacute;ch trực quan nhất v&agrave; chia sẽ th&ocirc;ng tin n&agrave;y cho tất cả c&aacute;c th&agrave;nh vi&ecirc;n.</p>

<p>I. Mục ti&ecirc;u<br />
- Thể hiện được t&igrave;nh trạng hiện tại của việc assign &amp; commit của member v&agrave;o từng dự &aacute;n hoặc c&aacute;c c&ocirc;ng việc R&amp;D, hỗ trợ nội bộ.<br />
- Gi&uacute;p cho việc tổng kết cuối th&aacute;ng v&agrave; kế hoạch th&aacute;ng kế tiếp của Lead / PM dễ d&agrave;ng hơn. Đ&aacute;nh gi&aacute; hiệu quả&nbsp;theo Qu&iacute; / Năm của team v&agrave; của member ch&iacute;nh x&aacute;c hơn. Từ đ&oacute; c&oacute; những gợi &yacute; để team / member ph&aacute;t triển hơn nữa.<br />
- Dễ d&agrave;ng triển khai những &yacute; tưởng mới, n&acirc;ng cao chất lượng dự &aacute;n v&agrave; ph&aacute;t triển R&amp;D nội bộ<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
II. C&aacute;ch thực hiện.<br />
- Mỗi cuối ng&agrave;y, từng th&agrave;nh vi&ecirc;n&nbsp;d&agrave;nh 3 - 5 ph&uacute;t để input th&ocirc;ng tin v&agrave;o form sau.<br />

&nbsp;&nbsp;&nbsp;&nbsp;p/s: Đ&atilde; chuẩn bị sẵn link form auto điền t&ecirc;n member. &lt;Li&ecirc;n hệ leader để c&oacute; link cho từng members&gt;<br />
- Khi post form, mỗi dự &aacute;n l&agrave; 1 record, phần 【Activity / purpose / mission 】chỉ cần ghi ngắn gọn. V&iacute; dụ như: &quot;Đọc t&agrave;i liệu&quot;, &quot;Support ABC&quot;, &quot;Hỗ trợ member X&quot;, &quot;Seminar&quot; v.v...<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;+ nếu commit ch&iacute;nh 1 dự &aacute;n v&agrave; support 1 dự &aacute;n th&igrave; post 2 record<br />
- Lead dự &aacute;n sẽ được xem v&agrave; kiểm tra lại th&ocirc;ng tin member đ&atilde; nh&acirc;p c&oacute; ch&iacute;nh x&aacute;c chưa (h&agrave;ng ng&agrave;y hoặc h&agrave;ng tuần), nếu cần c&oacute; thể tự sửa lại cho đ&uacute;ng.<br />
- Member c&oacute; thể được xem những th&ocirc;ng tin li&ecirc;n quan đến dự &aacute;n v&agrave; member của dự &aacute;n m&igrave;nh đang tham gia &lt;t&iacute;nh năng n&agrave;y sẽ cập nhật sau&gt;<br />
III. Lưu &yacute;<br />
- Mỗi th&agrave;nh vi&ecirc;n c&oacute; thể commit nhiều hơn hoặc &iacute;t hơn 8 tiếng 1 ng&agrave;y. C&oacute; thể post form v&agrave;o cuối tuần hoặc buổi tối nếu c&oacute; hỗ trợ dự &aacute;n&nbsp;những việc đột xuất.<br />
- C&oacute; project 【TEQ_TRT】&amp; 【TEQ_Other】d&agrave;nh cho những c&ocirc;ng việc R&amp;D, support nội bộ hoặc sermina, present v.v..<br />
- Nếu hỗ trợ nhiều task linh tinh trong 1 dự &aacute;n th&igrave; chỉ cần summary lại theo dự &aacute;n v&agrave; post 1 form.<br />
- Mọi thắc mắc c&oacute; thể li&ecirc;n hệ với leader / lead dự &aacute;n,</p>

@Sub6Resources
Copy link
Owner

Thank you for the code snippet to test. I will investigate the slowness issue. Is the app slow every time?

@Sub6Resources Sub6Resources reopened this Feb 13, 2020
@aquilarafa
Copy link

aquilarafa commented Feb 17, 2020

Same with me...
SOLVED:
For me the issue was that I had a long html text in Html widget. Scrolling caused Html widget to rebuilt and therefore was very laggy.

My approach was to build the Html widget only once:

if(htmlWidget == null){
htmlWidget = Html(...);
}
return htmlWidget;

@cuongloveit
Copy link

Thank you for the code snippet to test. I will investigate the slowness issue. Is the app slow every time?

the app slow is not always slow every time but the above html snippets cause lagginess to the app.

@cuongloveit
Copy link

Same with me...
SOLVED:
For me the issue was that I had a long html text in Html widget. Scrolling caused Html widget to rebuilt and therefore was very laggy.

My approach was to build the Html widget only once:

if(htmlWidget == null){
htmlWidget = Html(...);
}
return htmlWidget;

yes. me too. it's very slow when scroll

@khanhnguyen-96
Copy link

Same with me...
SOLVED:
For me the issue was that I had a long html text in Html widget. Scrolling caused Html widget to rebuilt and therefore was very laggy.

My approach was to build the Html widget only once:

if(htmlWidget == null){
htmlWidget = Html(...);
}
return htmlWidget;

Thank you, this solved the laggy scrolling html widget for me

@Ahmadre
Copy link
Author

Ahmadre commented Mar 5, 2020

I used another package, which worked fluently. No workarounds needed like this. And the other package is maintained regularly

@Sub6Resources
Copy link
Owner

I am working to improve performance for this package right now as well.

@Doflatango
Copy link

I used another package, which worked fluently. No workarounds needed like this. And the other package is maintained regularly

Hi @Ahmadre , which package you are using now? Does it have a good performance form very long content(may include images)?

@abhi36456
Copy link

No solution is there for this issue? @Sub6Resources

@erickok
Copy link
Collaborator

erickok commented Jun 10, 2022

Closing this in favor of the more detailed duplicate issue #361 which also explains why this isn't a straightforward thing to solve.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
more-info-needed More information is needed to resolve the issue. Will be closed if no response is received.
Projects
None yet
Development

No branches or pull requests

8 participants