CYRTextView icon indicating copy to clipboard operation
CYRTextView copied to clipboard

Crashes with large test files

Open Boyeen opened this issue 10 years ago • 6 comments

I noticed this in my own code but also in the demo. Everything works fine for small snippets but a largish file, say 100+ lines of code, allocates more and more memory then ultimately is terminated after scrolling a while. In fairness, I'm convinced this is due to memory leaks with UITextView in iOS7. I'm just wondering if anyone has found a workaround. It makes CYRTextView unusable for my purpose.

Boyeen avatar Feb 28 '14 20:02 Boyeen

Hi Boyeen,

Good catch. I'll investigate this issue and see what I can find.

illyabusigin avatar Mar 14 '14 19:03 illyabusigin

Hi Ilya,

Any further insight? As I'm sure you have found, iOS7 has some horrible bugs. The worst seems to me the poor memory deallocation algorithm. I am certain the bug I reported to you is not in your code, I see it in a regular UITextView with 1000 lines of code. I think it is related to ARC and the ongoing crashes of Springboard, especially in A7 devices. iOS7.1 helped a little but nowhere near enough. So, I would welcome your input.

BTW I really love the look of CYRTextView and plan to use it in my own app when I can reliably scroll 1000 lines of code.

Boyeen avatar Apr 07 '14 20:04 Boyeen

Boyeen, did you fix the issue with large files?

zyavrik avatar Jun 06 '14 07:06 zyavrik

Nope. It's very frustrating. It seems to be a problem in ARC/iOS7. If you try, you can recreate it using a totally standard UITextView although the memory usage doesn't grow as fast without the annotated strings.

On Fri, Jun 6, 2014 at 12:53 AM, altaveron [email protected] wrote:

Boyeen, did you fix the issue with large files?

— Reply to this email directly or view it on GitHub https://github.com/illyabusigin/CYRTextView/issues/11#issuecomment-45311657 .

Topcat Games - www.topcatgames.com

Boyeen avatar Jun 06 '14 19:06 Boyeen

Boyeen, what do you think about the following issue? https://github.com/illyabusigin/CYRTextView/issues/17

zyavrik avatar Jun 06 '14 19:06 zyavrik

hey @Boyeen , so, I have the same issue and noticed big performances issues when opening a large file , and scrolling.

If you shortcut the drawRect method (it only makes the line gutter fancy), the scrolling problem will go away. I'm planning on working on a PR to improve the perf of the drawRect.

For the problem of opening big files (it takes a while to process and display it) I'm still investigating what is the issue.

jayztemplier avatar Jul 18 '15 18:07 jayztemplier