当前位置:首页>python>Python 处理 EPUB 太慢?让 Rust 来拯救!

Python 处理 EPUB 太慢?让 Rust 来拯救!

  • 2026-04-13 08:50:26
Python 处理 EPUB 太慢?让 Rust 来拯救!

Python 处理 EPUB 太慢?让 Rust 来拯救!

朋友们,今天咱们来聊一个程序员们经常遇到但又不太愿意深究的话题——电子书处理。

不知道你们有没有这样的经历:想写个脚本批量处理下载的电子书,把 EPUB 转成 Markdown 方便阅读;或者想从电子书里提取所有图片;又或者想批量修改电子书元数据……

然后你兴冲冲地打开 Python,找到了ebooklib这个库,写了几行代码,一运行——好家伙,处理一本《战争与和平》要等半天!

这时候你是不是开始怀疑人生了?是我的代码写得太烂?还是 Python 太慢?还是我电脑该换了?

别急,今天我要给你介绍一个神器:fast-ebook。这玩意儿快得让你怀疑人生!

从“龟速”到“光速”:一个真实的性能对比

先来看一组让我下巴掉地上的数据:

处理一本 1.8MB 的《战争与和平》EPUB 文件,把它转换成单个 Markdown 文档:

  • 用传统的ebooklib + html2text组合:375 毫秒
  • fast-ebookbook.to_markdown()方法:56 毫秒

6.7 倍的速度提升!

这还不是最夸张的。如果你要从电子书里根据 ID 获取特定章节:

  • ebooklibget_item_with_id:慢吞吞
  • fast-ebook的同样方法:快 78 倍!

78 倍是什么概念?就是你原来要等 1 分钟的操作,现在不到 1 秒就完成了!

# 传统方式(慢)from ebooklib import epub as slow_epubbook = slow_epub.read_epub('war_and_peace.epub')# 等啊等...(内心OS:这书有这么长吗?)# fast-ebook方式(快)from fast_ebook import epubbook = epub.read_epub('war_and_peace.epub')# 诶?这就完了?

为什么 Python 需要 Rust 来“救场”?

看到这里你可能要问了:为什么一个 Python 库要用 Rust 来写核心部分?

这就得说说 Python 和 Rust 的“爱恨情仇”了。

Python 是个好语言,写起来快,读起来舒服,就像开自动挡汽车——方便!但是,它有个致命缺点:。不是一般的慢,是那种“我明明只是处理个文本,为什么感觉像在渲染 3D 动画”的慢。

Rust 呢?它就像是手动挡的超跑——上手难,但一旦掌握了,性能爆表!而且最关键的是,Rust 没有垃圾回收,内存安全,还能直接跟 C/C++库对话。

fast-ebook的作者arc53(这名字一看就是技术宅)显然深谙此道。他用 Rust 写了核心的 EPUB 解析和处理逻辑,然后用 PyO3(一个让 Python 能调用 Rust 代码的神器)做了个桥接。

这就好比:

  • Python 是前台接待,态度好,服务周到
  • Rust 是后台工程师,埋头苦干,效率极高
  • PyO3 是内部电话,让前台能随时呼叫后台支援

安装?简单到哭!

pip install fast-ebook

对,就这么简单。没有复杂的依赖,没有漫长的编译过程(因为作者已经帮你编译好了 wheel 包)。

如果你是个喜欢折腾的人,也可以从源码编译:

git clone https://github.com/arc53/fast-ebookcd fast-ebookpip install -e .

不过说实话,有现成的轮子,何必自己造呢?

从 ebooklib 迁移?无缝衔接!

我知道你在想什么:“我现有的代码都是用ebooklib写的,难道要全部重写?”

放心,fast-ebook的设计者早就想到了这一点。它提供了两种迁移方式:

方式一:直接替换导入

# 原来这么写from ebooklib import epubimport ebooklib# 现在改成from fast_ebook import epubimport fast_ebook  # 常量也在这里

方式二:使用兼容层(更推荐!)

# 一行代码搞定迁移import fast_ebook.compat as ebooklibfrom fast_ebook.compat import epub# 原来的代码完全不用改!

这个兼容层设计得太贴心了,让我想起了那些“向下兼容”的良心软件开发商。

实战演练:看看 fast-ebook 有多好用

场景一:读取电子书并提取信息

from fast_ebook import epubimport fast_ebook# 读取电子书(支持文件路径、bytes、BytesIO)book = epub.read_epub('book.epub')# 获取元数据title = book.get_metadata('DC''title')print(f"书名:{title}")# 获取所有图片for img in book.get_items_of_type(fast_ebook.ITEM_IMAGE):    print(f"图片:{img.get_name()},大小:{len(img.get_content())}字节")# 根据ID获取特定章节chapter = book.get_item_with_id('chapter1')if chapter:    print(f"找到章节:{chapter.get_name()}")# 遍历目录for entry in book.toc:    print(f"章节:{entry.title},链接:{entry.href}")

场景二:创建新的电子书

from fast_ebook import epub# 创建新书book = epub.EpubBook()book.set_identifier('my_unique_id_123')book.set_title('我的第一本电子书')book.set_language('zh-CN')  # 支持中文!book.add_author('技术宅小明')# 添加章节chapter1 = epub.EpubHtml(    title='第一章:开始',    file_name='chap_01.xhtml',    lang='zh-CN')chapter1.content = '''<h1>你好,世界!</h1><p>这是我的第一本电子书。</p><p>用<strong>fast-ebook</strong>创建电子书真是太简单了!</p>'''book.add_item(chapter1)# 添加必要的导航文件book.add_item(epub.EpubNcx())  # NCX目录(兼容老设备)book.add_item(epub.EpubNav())  # 导航文档(EPUB3标准)# 设置目录和阅读顺序book.toc = [epub.Link('chap_01.xhtml''第一章:开始''chap1')]book.spine = ['nav', chapter1]  # spine决定阅读顺序# 保存epub.write_epub('my_book.epub', book)print("电子书创建完成!")

场景三:批量处理(这才是重头戏!)

from fast_ebook import epubfrom pathlib import Pathimport time# 假设你有个电子书文件夹ebook_folder = Path('./ebooks')epub_files = list(ebook_folder.glob('*.epub'))print(f"找到 {len(epub_files)} 个EPUB文件")# 传统方式:一个一个处理start_time = time.time()for epub_file in epub_files:    book = epub.read_epub(str(epub_file))# 处理逻辑...traditional_time = time.time() - start_time# fast-ebook并行处理start_time = time.time()# 使用4个工作线程并行处理books = epub.read_epubs(    [str(f) for f in epub_files],    workers=4# 根据CPU核心数调整)parallel_time = time.time() - start_timeprint(f"传统方式耗时:{traditional_time:.2f}秒")print(f"并行处理耗时:{parallel_time:.2f}秒")print(f"速度提升:{traditional_time/parallel_time:.1f}倍")

高级特性:你可能不知道的用法

1. 懒加载模式

如果你的电子书很大,但只需要部分内容,可以用懒加载:

# 只加载元数据和目录,不加载具体内容book = epub.read_epub('huge_book.epub', lazy=True)# 当需要某个章节时才加载chapter = book.get_item_with_id('chapter5')# 这时候才真正从文件读取内容

2. 忽略 NCX 或 NAV

有些电子书的 NCX 或 NAV 文件可能有问题:

# 跳过有问题的导航文件book = epub.read_epub('problematic.epub', ignore_ncx=True, ignore_nav=True)

3. 使用上下文管理器

# 自动清理资源with epub.read_epub('book.epub'as book:# 在这里处理电子书    markdown = book.to_markdown()# 离开with块后自动清理

4. 直接处理内存数据

# 从网络下载的电子书import requestsresponse = requests.get('https://example.com/book.epub')# 直接使用bytes数据book = epub.read_epub(response.content)# 或者使用BytesIOfrom io import BytesIObio = BytesIO(response.content)book = epub.read_epub(bio)

性能优化背后的秘密

你可能好奇:为什么fast-ebook能这么快?让我给你扒一扒它的“内幕”:

1. Rust 的内存管理

Rust 没有垃圾回收,内存分配和释放完全由程序员控制。这意味着:

  • 没有 GC 停顿
  • 内存使用更高效
  • 缓存友好

2. 零拷贝解析

传统的 XML/HTML 解析需要多次拷贝数据。fast-ebook使用了一种“零拷贝”技术,直接在原始数据上操作,减少了大量内存拷贝。

3. 并行处理

EPUB 文件本质上是 ZIP 压缩包,里面包含多个文件。fast-ebook可以并行解压和处理这些文件,充分利用多核 CPU。

4. 优化的数据结构

fast-ebook内部使用了专门为 EPUB 设计的数据结构,避免了不必要的转换和拷贝。

安全考虑:处理不可信文件

如果你要处理来自不可信来源的 EPUB 文件(比如用户上传),安全就很重要了。fast-ebook在这方面也做了考虑:

  1. 深度限制:防止恶意构造的深层嵌套 XML
  2. 实体展开限制:防止 XML 实体攻击
  3. 内存限制:防止内存耗尽攻击
  4. 文件数量限制:防止 ZIP 炸弹

当然,作者也坦诚地说:如果你要处理完全不可信的文件,最好在沙箱环境中运行。

实际应用场景

场景一:个人电子书管理工具

import sqlite3from pathlib import Pathfrom fast_ebook import epubclassEbookManager:def__init__(self, db_path='ebooks.db'):        self.conn = sqlite3.connect(db_path)        self.create_tables()defcreate_tables(self):        self.conn.execute('''            CREATE TABLE IF NOT EXISTS ebooks (                id INTEGER PRIMARY KEY,                path TEXT UNIQUE,                title TEXT,                author TEXT,                language TEXT,                file_size INTEGER,                added_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP            )        ''')defimport_ebook(self, epub_path):"""导入电子书并提取元数据"""try:            book = epub.read_epub(epub_path)# 提取元数据            title = book.get_metadata('DC''title')            author = book.get_metadata('DC''creator')            language = book.get_metadata('DC''language')# 获取文件大小            file_size = Path(epub_path).stat().st_size# 存入数据库            self.conn.execute('''                INSERT OR REPLACE INTO ebooks                (path, title, author, language, file_size)                VALUES (?, ?, ?, ?, ?)            ''', (str(epub_path), title, author, language, file_size))            self.conn.commit()            print(f"已导入:{title}")except Exception as e:            print(f"导入失败 {epub_path}{e}")defbatch_import(self, folder_path):"""批量导入文件夹中的所有EPUB"""        folder = Path(folder_path)        epub_files = folder.glob('**/*.epub')for epub_file in epub_files:            self.import_ebook(epub_file)defexport_to_markdown(self, ebook_id, output_dir):"""将电子书导出为Markdown"""# 从数据库获取电子书信息        cursor = self.conn.execute('SELECT path, title FROM ebooks WHERE id = ?',            (ebook_id,)        )        result = cursor.fetchone()ifnot result:            print("未找到电子书")return        epub_path, title = result# 转换为Markdown        book = epub.read_epub(epub_path)        markdown_content = book.to_markdown()# 保存        output_path = Path(output_dir) / f"{title}.md"        output_path.write_text(markdown_content, encoding='utf-8')        print(f"已导出:{output_path}")# 使用示例manager = EbookManager()manager.batch_import('./my_ebooks')  # 导入所有电子书manager.export_to_markdown(1'./markdowns')  # 导出第一本为Markdown

场景二:电子书内容分析

from collections import Counterimport jieba  # 中文分词from fast_ebook import epubclassEbookAnalyzer:def__init__(self):        self.stop_words = self.load_stop_words()defload_stop_words(self):"""加载停用词表"""# 这里可以加载中文停用词表return {'的''了''在''是''我''有''和''就''不''人''都''一''一个''上''也''很''到''说''要''去''你''会''着''没有''看''好''自己''这'}defanalyze_ebook(self, epub_path):"""分析电子书内容"""        book = epub.read_epub(epub_path)# 获取所有文本内容        all_text = ""for item in book.get_items():if item.get_type() == 9:  # 文本类型                content = item.get_content().decode('utf-8', errors='ignore')                all_text += content# 中文分词        words = jieba.lcut(all_text)# 过滤停用词和短词        filtered_words = [            word for word in wordsif len(word) > 1and word notin self.stop_words        ]# 词频统计        word_freq = Counter(filtered_words)# 获取前20个高频词        top_words = word_freq.most_common(20)return {'total_words': len(filtered_words),'unique_words': len(word_freq),'top_words': top_words,'avg_word_length': sum(len(w) for w in filtered_words) / len(filtered_words) if filtered_words else0        }defcompare_ebooks(self, epub_paths):"""比较多本电子书"""        results = {}for path in epub_paths:            print(f"正在分析:{path}")            results[path] = self.analyze_ebook(path)# 生成比较报告        print("\n=== 电子书比较报告 ===")for path, stats in results.items():            print(f"\n{Path(path).name}:")            print(f"  总词数:{stats['total_words']}")            print(f"  唯一词数:{stats['unique_words']}")            print(f"  平均词长:{stats['avg_word_length']:.2f}")            print(f"  高频词:{', '.join([w for w, _ in stats['top_words'][:5]])}")# 使用示例analyzer = EbookAnalyzer()stats = analyzer.analyze_ebook('novel.epub')print(f"这本小说用了 {stats['total_words']} 个词")print(f"最常用的词是:{stats['top_words'][0][0]}(出现了{stats['top_words'][0][1]}次)")

场景三:自动生成电子书摘要

from fast_ebook import epubimport reclassEbookSummarizer:defsummarize(self, epub_path, max_chapters=3):"""生成电子书摘要"""        book = epub.read_epub(epub_path)# 获取目录        toc = book.toc# 提取前几章的内容        summary = []        chapters_processed = 0for entry in toc:if chapters_processed >= max_chapters:break# 根据href找到对应的章节            item = book.get_item_with_href(entry.href)if item:                content = item.get_content().decode('utf-8', errors='ignore')# 清理HTML标签(简单版本)                text = re.sub(r'<[^>]+>''', content)# 提取前500个字符作为摘要                preview = text[:500] + "..."if len(text) > 500else text                summary.append({'title': entry.title,'preview': preview                })                chapters_processed += 1return summarydefgenerate_readme(self, epub_path, output_path):"""生成电子书的README文件"""        book = epub.read_epub(epub_path)# 获取元数据        title = book.get_metadata('DC''title'or"未知标题"        author = book.get_metadata('DC''creator'or"未知作者"# 生成摘要        summary = self.summarize(epub_path)# 构建README内容        readme_content = f"""# {title}作者:{author}## 内容简介"""for i, chapter in enumerate(summary, 1):            readme_content += f"\n### 第{i}章:{chapter['title']}\n\n"            readme_content += f"{chapter['preview']}\n"        readme_content += "\n---\n"        readme_content += "本文件由fast-ebook自动生成"# 保存with open(output_path, 'w', encoding='utf-8'as f:            f.write(readme_content)        print(f"已生成README:{output_path}")# 使用示例summarizer = EbookSummarizer()summarizer.generate_readme('book.epub''book_README.md')

常见问题解答

Q1: fast-ebook 支持 EPUB2 和 EPUB3 吗?

A: 完全支持!无论是老式的 EPUB2 还是新式的 EPUB3,都能完美处理。

Q2: 中文支持怎么样?

A: 非常好!完全支持 UTF-8 编码,中文标题、作者、内容都没问题。

Q3: 需要安装 Rust 吗?

A: 不需要!fast-ebook已经预编译好了,直接pip install就能用。

Q4: 能处理加密的 EPUB 吗?

A: 目前不支持 DRM 加密的 EPUB。对于普通的、没有 DRM 的 EPUB,完全没问题。

Q5: 性能真的有那么好吗?

A: 官方基准测试显示,大多数操作都比ebooklib快 3-78 倍。实际使用中,速度提升非常明显,特别是处理大文件或批量处理时。

Q6: 内存占用大吗?

A: 比ebooklib小很多!Rust 的内存管理非常高效,而且支持懒加载,可以按需加载内容。

未来展望

fast-ebook虽然已经很强大,但作者还在积极开发中。根据 GitHub 仓库的更新频率,这个项目非常活跃。

我期待的未来功能:

  1. 更多格式支持:除了 EPUB,能不能支持 MOBI、AZW3 等格式?
  2. 更智能的内容提取:自动识别章节、提取主要内容
  3. 云集成:直接处理云存储中的电子书
  4. GUI 工具:给非程序员用户提供图形界面

结语

在技术世界里,我们经常面临选择:是用熟悉的但慢的工具,还是学习新的但快的工具?fast-ebook给了我们一个完美的答案:既不用放弃 Python 的便利,又能享受 Rust 的性能

这个库让我想起了那句话:“不要重复造轮子,但要学会用更好的轮子。”

如果你经常需要处理电子书,或者你的项目中有 EPUB 处理的需求,我强烈建议你试试fast-ebook。它可能会让你重新思考:原来电子书处理可以这么快!


技术栈总结

  • 核心:Rust(性能担当)
  • 桥接:PyO3(沟通担当)
  • 接口:Python(易用担当)
  • 结果:快!快!快!(用户感受)

适用人群

  • 电子书爱好者
  • 需要批量处理 EPUB 的开发者
  • 对性能有要求的内容处理项目
  • 想要学习如何用 Rust 优化 Python 性能的人

不适用人群

  • 只需要偶尔处理一两个小 EPUB 文件的用户(用什么都行)
  • 必须处理 DRM 加密电子书的用户(目前不支持)
  • 害怕学习新工具的人(其实迁移成本很低)

好了,今天的分享就到这里。快去试试fast-ebook吧,相信你会被它的速度惊艳到的!

如果你在使用中遇到问题,或者有更好的使用技巧,欢迎在评论区分享。技术之路,我们一起进步!


相关资源

  • GitHub 仓库:https://github.com/arc53/fast-ebook
  • PyPI 页面:https://pypi.org/project/fast-ebook/

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-04-15 11:34:22 HTTP/2.0 GET : https://f.mffb.com.cn/a/486166.html
  2. 运行时间 : 0.100435s [ 吞吐率:9.96req/s ] 内存消耗:4,777.87kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=004353adf4548a023b7be75c69505611
  1. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/public/index.php ( 0.79 KB )
  2. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/autoload.php ( 0.17 KB )
  3. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_real.php ( 2.49 KB )
  4. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/platform_check.php ( 0.90 KB )
  5. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/ClassLoader.php ( 14.03 KB )
  6. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/composer/autoload_static.php ( 4.90 KB )
  7. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper.php ( 8.34 KB )
  8. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/helper.php ( 2.19 KB )
  9. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/helper.php ( 1.47 KB )
  10. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/stubs/load_stubs.php ( 0.16 KB )
  11. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Exception.php ( 1.69 KB )
  12. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Facade.php ( 2.71 KB )
  13. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/deprecation-contracts/function.php ( 0.99 KB )
  14. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap.php ( 8.26 KB )
  15. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/polyfill-mbstring/bootstrap80.php ( 9.78 KB )
  16. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/Resources/functions/dump.php ( 1.49 KB )
  17. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-dumper/src/helper.php ( 0.18 KB )
  18. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/symfony/var-dumper/VarDumper.php ( 4.30 KB )
  19. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/App.php ( 15.30 KB )
  20. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-container/src/Container.php ( 15.76 KB )
  21. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/container/src/ContainerInterface.php ( 1.02 KB )
  22. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/provider.php ( 0.19 KB )
  23. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Http.php ( 6.04 KB )
  24. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Str.php ( 7.29 KB )
  25. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Env.php ( 4.68 KB )
  26. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/common.php ( 0.03 KB )
  27. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/helper.php ( 18.78 KB )
  28. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Config.php ( 5.54 KB )
  29. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/app.php ( 0.95 KB )
  30. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cache.php ( 0.78 KB )
  31. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/console.php ( 0.23 KB )
  32. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/cookie.php ( 0.56 KB )
  33. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/database.php ( 2.48 KB )
  34. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Env.php ( 1.67 KB )
  35. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/filesystem.php ( 0.61 KB )
  36. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/lang.php ( 0.91 KB )
  37. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/log.php ( 1.35 KB )
  38. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/middleware.php ( 0.19 KB )
  39. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/route.php ( 1.89 KB )
  40. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/session.php ( 0.57 KB )
  41. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/trace.php ( 0.34 KB )
  42. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/config/view.php ( 0.82 KB )
  43. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/event.php ( 0.25 KB )
  44. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Event.php ( 7.67 KB )
  45. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/service.php ( 0.13 KB )
  46. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/AppService.php ( 0.26 KB )
  47. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Service.php ( 1.64 KB )
  48. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Lang.php ( 7.35 KB )
  49. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/lang/zh-cn.php ( 13.70 KB )
  50. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/Error.php ( 3.31 KB )
  51. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/RegisterService.php ( 1.33 KB )
  52. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/services.php ( 0.14 KB )
  53. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/PaginatorService.php ( 1.52 KB )
  54. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ValidateService.php ( 0.99 KB )
  55. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/service/ModelService.php ( 2.04 KB )
  56. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Service.php ( 0.77 KB )
  57. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Middleware.php ( 6.72 KB )
  58. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/initializer/BootService.php ( 0.77 KB )
  59. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Paginator.php ( 11.86 KB )
  60. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-validate/src/Validate.php ( 63.20 KB )
  61. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/Model.php ( 23.55 KB )
  62. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Attribute.php ( 21.05 KB )
  63. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/AutoWriteData.php ( 4.21 KB )
  64. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/Conversion.php ( 6.44 KB )
  65. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/DbConnect.php ( 5.16 KB )
  66. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/ModelEvent.php ( 2.33 KB )
  67. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/concern/RelationShip.php ( 28.29 KB )
  68. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Arrayable.php ( 0.09 KB )
  69. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/contract/Jsonable.php ( 0.13 KB )
  70. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/model/contract/Modelable.php ( 0.09 KB )
  71. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Db.php ( 2.88 KB )
  72. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/DbManager.php ( 8.52 KB )
  73. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Log.php ( 6.28 KB )
  74. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Manager.php ( 3.92 KB )
  75. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerTrait.php ( 2.69 KB )
  76. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/log/src/LoggerInterface.php ( 2.71 KB )
  77. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cache.php ( 4.92 KB )
  78. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/psr/simple-cache/src/CacheInterface.php ( 4.71 KB )
  79. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/helper/Arr.php ( 16.63 KB )
  80. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/driver/File.php ( 7.84 KB )
  81. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/cache/Driver.php ( 9.03 KB )
  82. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/CacheHandlerInterface.php ( 1.99 KB )
  83. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/Request.php ( 0.09 KB )
  84. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Request.php ( 55.78 KB )
  85. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/middleware.php ( 0.25 KB )
  86. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Pipeline.php ( 2.61 KB )
  87. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/TraceDebug.php ( 3.40 KB )
  88. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/middleware/SessionInit.php ( 1.94 KB )
  89. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Session.php ( 1.80 KB )
  90. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/driver/File.php ( 6.27 KB )
  91. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/SessionHandlerInterface.php ( 0.87 KB )
  92. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/session/Store.php ( 7.12 KB )
  93. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Route.php ( 23.73 KB )
  94. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleName.php ( 5.75 KB )
  95. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Domain.php ( 2.53 KB )
  96. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleGroup.php ( 22.43 KB )
  97. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Rule.php ( 26.95 KB )
  98. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/RuleItem.php ( 9.78 KB )
  99. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/route/app.php ( 1.72 KB )
  100. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/Route.php ( 4.70 KB )
  101. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/dispatch/Controller.php ( 4.74 KB )
  102. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/route/Dispatch.php ( 10.44 KB )
  103. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/controller/Index.php ( 4.81 KB )
  104. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/app/BaseController.php ( 2.05 KB )
  105. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/facade/Db.php ( 0.93 KB )
  106. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/connector/Mysql.php ( 5.44 KB )
  107. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/PDOConnection.php ( 52.47 KB )
  108. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Connection.php ( 8.39 KB )
  109. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/ConnectionInterface.php ( 4.57 KB )
  110. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/builder/Mysql.php ( 16.58 KB )
  111. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Builder.php ( 24.06 KB )
  112. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseBuilder.php ( 27.50 KB )
  113. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/Query.php ( 15.71 KB )
  114. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/BaseQuery.php ( 45.13 KB )
  115. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TimeFieldQuery.php ( 7.43 KB )
  116. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/AggregateQuery.php ( 3.26 KB )
  117. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ModelRelationQuery.php ( 20.07 KB )
  118. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ParamsBind.php ( 3.66 KB )
  119. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/ResultOperation.php ( 7.01 KB )
  120. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/WhereQuery.php ( 19.37 KB )
  121. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/JoinAndViewQuery.php ( 7.11 KB )
  122. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/TableFieldInfo.php ( 2.63 KB )
  123. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-orm/src/db/concern/Transaction.php ( 2.77 KB )
  124. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/driver/File.php ( 5.96 KB )
  125. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/LogHandlerInterface.php ( 0.86 KB )
  126. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/log/Channel.php ( 3.89 KB )
  127. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/event/LogRecord.php ( 1.02 KB )
  128. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-helper/src/Collection.php ( 16.47 KB )
  129. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/facade/View.php ( 1.70 KB )
  130. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/View.php ( 4.39 KB )
  131. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Response.php ( 8.81 KB )
  132. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/response/View.php ( 3.29 KB )
  133. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/Cookie.php ( 6.06 KB )
  134. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-view/src/Think.php ( 8.38 KB )
  135. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/framework/src/think/contract/TemplateHandlerInterface.php ( 1.60 KB )
  136. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/Template.php ( 46.61 KB )
  137. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/driver/File.php ( 2.41 KB )
  138. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-template/src/template/contract/DriverInterface.php ( 0.86 KB )
  139. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/runtime/temp/067d451b9a0c665040f3f1bdd3293d68.php ( 11.98 KB )
  140. /yingpanguazai/ssd/ssd1/www/f.mffb.com.cn/vendor/topthink/think-trace/src/Html.php ( 4.42 KB )
  1. CONNECT:[ UseTime:0.000649s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000847s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.001685s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000303s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000496s ]
  6. SELECT * FROM `set` [ RunTime:0.000228s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000534s ]
  8. SELECT * FROM `article` WHERE `id` = 486166 LIMIT 1 [ RunTime:0.006469s ]
  9. UPDATE `article` SET `lasttime` = 1776224062 WHERE `id` = 486166 [ RunTime:0.014896s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000244s ]
  11. SELECT * FROM `article` WHERE `id` < 486166 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000495s ]
  12. SELECT * FROM `article` WHERE `id` > 486166 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000460s ]
  13. SELECT * FROM `article` WHERE `id` < 486166 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.001320s ]
  14. SELECT * FROM `article` WHERE `id` < 486166 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.001278s ]
  15. SELECT * FROM `article` WHERE `id` < 486166 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.000838s ]
0.101978s