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

loading a long html, it will make app freeze #281

Open
yihuds opened this issue Apr 12, 2021 · 2 comments
Open

loading a long html, it will make app freeze #281

yihuds opened this issue Apr 12, 2021 · 2 comments

Comments

@yihuds
Copy link

yihuds commented Apr 12, 2021

when we load a HTML with long content, app will become freeze and then killed by iOS system.

@nnhubbard
Copy link
Owner

This sounds like an issue with WKWebView.

@101airborne
Copy link

I had a similar issue. I found that HTML with a lot of formatting appeared to hang my mac catalyst app, but found it was actually just taking an extremely long time. On debugging the issue I found that the culprit was CYRTextView.h/m which is a subclass of UITextView. It is the class used for the text view of the HTML, sourceView. My local fix was to make sourceView's class UITextView instead of CYRTextView.

//
// ZSSTextView.h
// ZSSRichTextEditor
//
// Created by Nicholas Hubbard on 1/29/14.
// Copyright (c) 2014 Zed Said Studio. All rights reserved.
//

#import "CYRTextView.h"

// Fix Issue #10 - "Extremely slow opening note copied/pasted from
// web page". Eliminate the syntax formatting of the HTML that was
// causing the very slow note loading. Remove CYRTextView subclassing
// of UITextView. The "Show Source" tool will now display unformatted,
// unsyntaxed HTML.
//@interface ZSSTextView : CYRTextView
@interface ZSSTextView : UITextView

@Property (nonatomic, strong) UIFont *defaultFont;
@Property (nonatomic, strong) UIFont *boldFont;
@Property (nonatomic, strong) UIFont *italicFont;

@EnD

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

3 participants