gpt4 book ai didi

ios - 在 iOS 中访问文本文件内容和字符数非常慢

转载 作者:行者123 更新时间:2023-11-29 02:00:00 25 4
gpt4 key购买 nike

我正在 iOS 中处理一个文本文件。文件大小不断增加并达到 10 MB 的大小。问题是访问内容变得非常慢。有没有其他方法可以加快这个过程。另外,我想要文本的总字符长度/计数文件。它在主线程中运行。

NSString* content = [NSString stringWithContentsOfFile:path  usedEncoding:&encoding  error:NULL];

最佳答案

您的问题有太多解决方案:

1- Reading file with more than 1MB

2- Reading file with more than 1MB

关于ios - 在 iOS 中访问文本文件内容和字符数非常慢,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30478462/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com