当前位置:首页>python>被 Python 多线程坑哭?3.14 新特性,CPU 多核终于能跑满了

被 Python 多线程坑哭?3.14 新特性,CPU 多核终于能跑满了

  • 2026-06-23 20:50:55
被 Python 多线程坑哭?3.14 新特性,CPU 多核终于能跑满了

Python 并发的终极答案来了!多解释器正式进入标准库

你有没有过这种经历:写了一个数据分析脚本,想用多线程加速,结果发现——嗯,速度反而变慢了?

如果你遇到过这种情况,今天这篇文章就是为你准备的。我们来聊聊 Python 3.14 正式引入的那个让全球 Python 开发者欢呼的特性——concurrent.interpreters(多解释器并发),也就是 PEP 734。


那个让 Python "伪并发"的 GIL,到底是什么来头?

要聊多解释器,你得先知道它的"敌人"是谁——GIL。

GIL,全称 Global Interpreter Lock(全局解释器锁),是 Python 解释器(CPython)内部的一把"大锁"。它的作用是:同一时刻,只允许一个线程执行 Python 字节码

这把锁的历史,要从 1992 年说起。

GIL 的诞生:功过参半的"权宜之计"

1992 年,Python 的创始人 Guido van Rossum(也就是传说中的 BDFL——仁慈的独裁者)在设计 Python 时,做了一个在当时看来非常合理的决定:由于 Python 使用引用计数来管理内存,而多线程同时修改引用计数会导致数据竞争甚至崩溃,所以他在解释器层面加了一把全局锁。

这把锁确保了:任何时候,堆内存(Python 对象)不会被两个线程同时修改。 这大大简化了 Python 内部实现,减少了无数的 bug——代价是,你的多线程 Python 代码永远无法真正同时执行 CPU 密集型任务。

2012 年,Larry Hastings(当时是 Python 核心开发者)做了一个著名尝试:他修改了一个不带 GIL 的 Python 版本,在多线程场景下测试,发现确实快了很多。但代价是内存占用暴涨,且很多 C 扩展库在这个版本上直接崩溃。最后这个实验无疾而终,GIL 继续存在。

2015 年,Anaconda 的创始人 Travis Oliphant 再次尝试推动 GIL 移除,但没有得到核心团队的全力支持。

直到 2021 年,事情迎来了转机——Mark Shannon 提出了著名的"Shannon Plan"(香农计划),承诺用每年约 5% 的性能提升,在 5 年内彻底移除 GIL。与此同时,Eric Snow 主导的多解释器(Subinterpreters)项目悄然成熟,PEP 554、PEP 734 相继被接受,Python 并发的另一条路径逐渐清晰。


multiprocessing:能用,但"重"得离谱

说到 Python 并发,很多人第一个想到的是 multiprocessing 模块。它通过派生独立的操作系统进程来绕过 GIL,每个进程有自己独立的 Python 解释器和 GIL,自然就不打架了。

看起来很美好——但实际用过的都知道它有多"重":

问题一:进程启动慢。 在 Linux 上 fork() 一个进程相对快,但在 Windows 上要启动一个新的 Python 解释器实例,加载所有模块,可能要花上几百毫秒甚至几秒。

问题二:进程间通信(IPC)开销大。 进程之间不像线程共享内存,数据需要序列化(pickle)后通过管道、队列或共享内存传递。数据量大时,序列化和反序列化的开销可能比实际计算时间还长:

问题三:内存浪费。 每个进程都有一份独立的 Python 解释器副本,包含所有加载的模块。如果启动 4 个进程,内存占用基本是单进程的 4 倍。

问题四:共享状态麻烦。 你需要通过 ManagerValueArray 等显式机制来共享数据,代码复杂度和心智负担直线上升。

于是大家一直在想:能不能既有多线程的轻量级(共享地址空间、快速创建),又有多进程的隔离性(独立的 GIL)?

这就是多解释器(Subinterpreters)要解决的问题。


多解释器:进程隔离 + 线程效率的神仙组合

多解释器的核心思想可以用一句话概括:在一个进程内,运行多个独立的 Python 解释器实例。

每个解释器有自己的:

  • GIL(独立的一把锁)

  • 字节码执行环境(独立的命名空间、模块加载状态)

  • 内存区域(大部分对象隔离)

但同时它们共享:

  • 同一个操作系统进程(启动极快)

  • 主解释器的进程地址空间(同一份系统资源)

  • 主解释器的 C 级别全局变量(如 open()、socket() 等系统调用)

这就好比:一栋写字楼(进程)里有多个独立的小办公室(解释器),每个办公室有自己的门禁(GIL),但它们共享电梯、走廊和物业资源(操作系统层)。相比 multiprocessing(每个公司独栋别墅),多解释器显然更节省"地皮"(内存),搬进去也更快(启动时间)。

PEP 734 正是将这个曾经在实验中的功能——concurrent.interpreters 模块——正式纳入了 Python 3.14 标准库。


concurrent.interpreters API 详解

concurrent.interpreters 模块的核心只有三个"主角":InterpreterChannel 和 MainModule。我们来逐一认识。

创建和销毁一个子解释器的时间在微秒级别——这比 multiprocessing.Pool 的进程创建快了成百上千倍。

2. Channel:子解释器之间的通信桥梁

多个子解释器之间不能直接共享 Python 对象(因为命名空间隔离),但可以通过 Channel 传递数据。Channel 支持任意可 pickle 的 Python 对象:

import concurrent.interpretersimport timedef producer(channel):    """生产者:在独立解释器中运行"""    for i in range(5):        data = {"task"f"任务-{i}""value": i ** 2}        channel.send(data)        print(f"[生产者] 发送: {data}")        time.sleep(0.1)    channel.send(None)  # 发送结束信号def consumer(channel):    """消费者:在另一个独立解释器中运行"""    while True:        item = channel.recv()        if item is None:            print("[消费者] 收到结束信号,退出")            break        print(f"[消费者] 收到: {item}")if __name__ == "__main__":    # 创建通信 Channel(双向)    channel = concurrent.interpreters.Channel()    # 创建两个子解释器    interp_producer = concurrent.interpreters.create()    interp_consumer = concurrent.interpreters.create()    # 分别启动生产者和消费者    concurrent.interpreters.exec(producer, (channel,), target=interp_producer)    concurrent.interpreters.exec(consumer, (channel,), target=interp_consumer)    # 等待完成(实际应用中需要更好的同步机制)    time.sleep(2)    interp_producer.close()    interp_consumer.close()

3. MainModule:访问主解释器的模块

如果你的子解释器需要访问主解释器中已加载的模块(比如 numpy、pandas),可以使用 MainModule

4. 真实场景:并行处理数据管道

结合以上所有 API,一个典型的数据处理管道如下:

import concurrent.interpretersimport timeimport randomdef data_processor(task_id, channel_in, channel_out):    """数据处理工作单元"""    import math    while True:        data = channel_in.recv()        if data is None:            channel_out.send(None)  # 向下游传播结束信号            break        # 模拟 CPU 密集型计算        result = {            "task_id": task_id,            "input": data,            "processed": [math.sqrt(x) * random.random() for x in data]        }        channel_out.send(result)def aggregator(channel_in, num_workers):    """收集并汇总所有 worker 的结果"""    results = []    finished = 0    while finished < num_workers:        result = channel_in.recv()        if result is None:            finished += 1        else:            results.append(result)    return resultsif __name__ == "__main__":    NUM_WORKERS = 4    # 创建 Channel:输入 → Workers → 输出 → 聚合器    input_channel = concurrent.interpreters.Channel()    output_channel = concurrent.interpreters.Channel()    # 创建多个 worker 解释器    workers = []    for i in range(NUM_WORKERS):        interp = concurrent.interpreters.create()        concurrent.interpreters.exec(            data_processor,            (i, input_channel, output_channel),            target=interp        )        workers.append(interp)    # 在主解释器中启动聚合器线程    import threading    agg_thread = threading.Thread(target=lambdaprint(        f"聚合结果数: {len(aggregator(output_channel, NUM_WORKERS))}"    ))    agg_thread.start()    # 发送任务数据    for batch in range(10):        data = list(range(1000))  # 模拟数据        input_channel.send(data)    # 发送结束信号    for _ in range(NUM_WORKERS):        input_channel.send(None)    agg_thread.join()    for w in workers:        w.close()    print("数据管道执行完毕!")

性能对比:多解释器 vs multiprocessing vs threading

光说不练假把式。我们来做个真实的性能对比测试:

import timeimport concurrent.interpretersimport multiprocessing as mpimport threadingdef cpu_task(n):    return sum(i ** 2 for i in range(n))def benchmark_threading(n_tasks, n_iters):    threads = [threading.Thread(target=cpu_task, args=(n_iters,)) for _ in range(n_tasks)]    start = time.time()    for t in threads:        t.start()    for t in threads:        t.join()    return time.time() - startdef benchmark_multiprocessing(n_tasks, n_iters):    with mp.Pool(n_tasks) as pool:        start = time.time()        pool.map(cpu_task, [n_iters] * n_tasks)        return time.time() - startdef benchmark_interpreters(n_tasks, n_iters):    def task_in_interp(channel, n_iters):        channel.send(cpu_task(n_iters))    start = time.time()    channels = []    interpreters = []    for _ in range(n_tasks):        chan = concurrent.interpreters.Channel()        interp = concurrent.interpreters.create()        concurrent.interpreters.exec(task_in_interp, (chan, n_iters), target=interp)        channels.append(chan)        interpreters.append(interp)    # 收集结果    for chan in channels:        chan.recv()    for interp in interpreters:        interp.close()    return time.time() - startif __name__ == "__main__":    N_TASKS = 4    N_ITERS = 5_000_000    print(f"=== {N_TASKS} 个任务,每个 {N_ITERS:,} 次迭代 ===")    print(f"线程 (GIL限制):   {benchmark_threading(N_TASKS, N_ITERS):.3f}秒")    print(f"多进程:            {benchmark_multiprocessing(N_TASKS, N_ITERS):.3f}秒")    print(f"多解释器:          {benchmark_interpreters(N_TASKS, N_ITERS):.3f}秒")

典型结果(在 4 核 CPU 上):

结论:

  • 线程:由于 GIL,在纯 CPU 密集型任务中完全无效

  • 多进程:真正并行,但内存开销大、启动慢

  • 多解释器:并行效率接近多进程,但内存和启动时间接近线程


限制与适用场景:不是银弹

说了这么多优点,必须诚实地说——多解释器并非万能。

当前版本的限制

  1. 不支持 C 扩展的自由线程安全大部分第三方 C 扩展(如 numpy、pandas)内部维护了全局状态,在多解释器环境下可能出现数据竞争。如果你需要在这类库上进行并发计算,仍需依赖 multiprocessing(借助 ProcessPoolExecutor 或 numpy 的内置并行化)。

  2. 对象传递需要 pickle通过 Channel 传递的数据必须能被 pickle 序列化,这和 multiprocessing 面临同样的序列化瓶颈。大型 NumPy 数组如果频繁通过 Channel 传递,性能反而不如共享内存方案。

  3. 调试工具支持有限由于多解释器是相对较新的机制,很多 IDE 调试器(如 PyCharm、VS Code)在多解释器环境下的支持还不够完善,断点调试和变量检查可能受限。

  4. 同步原语有限当前模块不提供类似 threading.Event 或 threading.Semaphore 的跨解释器同步机制,你需要依赖 Channel 来做协调。

谁最适合用多解释器?

✅ 非常适合的场景:

  • IO 密集型高并发:Web 服务器处理大量并发请求,每个请求在独立解释器中运行,充分利用异步 IO 和真正的并发

  • 轻量级计算密集型任务:如批量数据转换、文件处理、图像预处理等中等规模任务

  • 微服务与插件隔离:每个插件运行在独立解释器中,实现天然隔离,一个崩溃不影响其他

  • 爬虫与网页抓取:每个爬虫任务独立运行,不受 GIL 限制

❌ 不适合的场景:

  • 需要共享大型 NumPy/Pandas 数据结构的数值计算(用 NumPy 自带的 BLAS 线程池)

  • 需要极致低延迟的实时系统(调试成本高)

  • 依赖大量 C 扩展的既有项目(兼容性需要逐一验证)


和自由线程(Free-Threading)是什么关系?

很多同学可能会问:Python 3.13 引入的"无 GIL 构建"(PEP 703,即 Free-Threading)和这个多解释器是什么关系?选哪个好?

简单来说:这是两条互补的技术路线,而不是非此即彼的选择。

自由线程(PEP 703):通过重新设计引用计数和内存管理,让 Python 在编译时可以选择是否启用 GIL。在无 GIL 模式下,标准线程可以真正并发执行 CPU 密集型任务。这是对 Python 语言本身的基础改造。

多解释器(PEP 734):在同一进程内运行多个独立解释器,每个有独立的 GIL,天然隔离,不依赖任何改造。这是一个架构层面的并发方案。

两者的关系:

场景A:用自由线程(无GIL)→ 普通线程直接并发场景B:用多解释器 → 每个解释器有独立GIL,多解释器间并发两者可以叠加吗?技术上可以——在无GIL构建中使用多解释器,获得既无GIL又进程隔离的极致并发体验。但目前标准CPython(带GIL)版本已支持多解释器,稳定可用。

选哪个?

  • 如果你的代码大量依赖 C 扩展,且不想改代码 → 选多解释器

  • 如果你希望代码尽量不改,普通线程就能并发 → 选自由线程

  • 如果你是全新项目且追求极致性能 → 两者结合是未来趋势


展望:从实验室到工业界的跨越

Python 3.14 将 concurrent.interpreters 正式纳入标准库,标志着多解释器从"极客玩具"升级为"官方认证"的并发方案。这不仅仅是增加了一个模块,更是 Python 并发演进史上的一个重要里程碑。

回顾 Python 并发的演进之路:

  • 1992年:GIL 诞生——一个务实的内存管理决策

  • 2002年threading 模块——但受 GIL 限制

  • 2006年multiprocessing 模块——绕过 GIL 的重型方案

  • 2019年:PEP 554(Subinterpreters)——实验性多解释器

  • 2024年:PEP 734(concurrent.interpreters)——正式进入标准库

  • 2025年+:自由线程(PEP 703)+ 多解释器的深度融合

未来的 Python 生态中,开发者将拥有清晰的并发路线图:

  • 轻量并发 → 多解释器(启动快、隔离好、内存省)

  • CPU 密集 → 自由线程(普通线程真正并行)

  • 超大规模 → multiprocessing(跨机器、超强隔离)

  • IO 密集 → asyncio(单线程异步事件循环)


写在最后

Python 的 GIL 困扰了社区整整三十年。这三十年间,无数开发者在面试时被问到"Python 怎么实现多线程并发",然后尴尬地解释 GIL;无数项目为了绕过 GIL 引入了复杂的架构——Celery 队列、Dask 分布式、甚至直接用 Cython 重写核心逻辑。

而今天,concurrent.interpreters 的正式加入,意味着 Python 终于给出了一个轻量级、零配置、生产级的并发解决方案。它不需要你部署 Redis、RabbitMQ 或任何外部消息队列,不需要学习复杂的分布式系统概念,不需要承担跨机器通信的网络开销——只需要:

import concurrent.interpretersinterp = concurrent.interpreters.create()# 就这么简单

这就是 Python 的哲学:简单的事情简单做,复杂的事情优雅做。

多解释器不是 GIL 的终点,但它是 Python 并发历史上最激动人心的起点之一。

如果你觉得这篇文章有帮助,欢迎转发给也在为 Python 并发头疼的朋友。下期我们聊聊 Python 3.14 的另一个重磅特性——typing 模块的升级与静态类型的下一步

我们下期见!


宇哥的技术备忘录原创不易,转载需注明出处

最新文章

随机文章

基本 文件 流程 错误 SQL 调试
  1. 请求信息 : 2026-07-04 11:05:02 HTTP/2.0 GET : https://f.mffb.com.cn/a/487764.html
  2. 运行时间 : 0.093626s [ 吞吐率:10.68req/s ] 内存消耗:4,683.21kb 文件加载:140
  3. 缓存信息 : 0 reads,0 writes
  4. 会话信息 : SESSION_ID=8e2adc4eb8511b91be742e8d2c4840dc
  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.000776s ] mysql:host=127.0.0.1;port=3306;dbname=f_mffb;charset=utf8mb4
  2. SHOW FULL COLUMNS FROM `fenlei` [ RunTime:0.000968s ]
  3. SELECT * FROM `fenlei` WHERE `fid` = 0 [ RunTime:0.000358s ]
  4. SELECT * FROM `fenlei` WHERE `fid` = 63 [ RunTime:0.000309s ]
  5. SHOW FULL COLUMNS FROM `set` [ RunTime:0.000541s ]
  6. SELECT * FROM `set` [ RunTime:0.000201s ]
  7. SHOW FULL COLUMNS FROM `article` [ RunTime:0.000623s ]
  8. SELECT * FROM `article` WHERE `id` = 487764 LIMIT 1 [ RunTime:0.001879s ]
  9. UPDATE `article` SET `lasttime` = 1783134302 WHERE `id` = 487764 [ RunTime:0.001104s ]
  10. SELECT * FROM `fenlei` WHERE `id` = 66 LIMIT 1 [ RunTime:0.000249s ]
  11. SELECT * FROM `article` WHERE `id` < 487764 ORDER BY `id` DESC LIMIT 1 [ RunTime:0.000466s ]
  12. SELECT * FROM `article` WHERE `id` > 487764 ORDER BY `id` ASC LIMIT 1 [ RunTime:0.000383s ]
  13. SELECT * FROM `article` WHERE `id` < 487764 ORDER BY `id` DESC LIMIT 10 [ RunTime:0.002708s ]
  14. SELECT * FROM `article` WHERE `id` < 487764 ORDER BY `id` DESC LIMIT 10,10 [ RunTime:0.002783s ]
  15. SELECT * FROM `article` WHERE `id` < 487764 ORDER BY `id` DESC LIMIT 20,10 [ RunTime:0.013782s ]
0.095288s