Open Closed

Abp Suite升级到v9.2.3之后代码生成非常慢 #9743


User avatar
0
15021087273 created

Check the docs before asking a question: https://abp.io/docs/latest Check the samples to see the basic tasks: https://abp.io/docs/latest/samples The exact solution to your question may have been answered before, and please first use the search on the homepage.

Provide us with the following info: 🧐 Hint: If you are using the ABP Studio, you can see all the information about your solution from the configuration window, which opens when you right-click on the solution and click on the Solution Configuration button.

  • Template: app-nolayers

  • Created ABP Studio Version: 1.1.2

  • Current ABP Studio Version: 1.1.2

  • Multi-Tenancy: Yes

  • UI Framework: angular

  • Theme: leptonx

  • Theme Style: system

  • Theme Menu Placement: side

  • Run Install Libs: Yes

  • Database Provider: ef

  • Database Management System: sqlserver

  • Create Initial Migration: Yes

  • Run Db Migrator: Yes

  • Social Login: No

  • Use Local References: No

  • Optional Modules:

    • GDPR
    • FileManagement
    • TextTemplateManagement
    • LanguageManagement
    • AuditLogging
    • OpenIddictAdmin
  • Selected Languages: English, 简体中文

  • Default Language: English

  • Create Command: abp new AbpSolution2 -t app-nolayers --ui-framework angular --mobile --database-provider ef --database-management-system sqlserver --theme leptonx --no-tests --without-cms-kit --dont-run-bundling --no-social-logins -file-management

  • Exception message and full stack trace:

  • Steps to reproduce the issue:

  • 重新安装了Abp Studio (V1.1.2)以及Abp Suite V9.2.3

尝试新建HelloWord类,包含Name,Code,Descrition3个字段,生成过程的截图:

包含CPU和内存状态的截图:

是升级之后导致的吗?该如何解决?


10 Answer(s)
  • User Avatar
    0
    AI-Bot created
    Support Team ABP Agent
    • 你遇到的 ABP Suite 代码生成极慢问题(如生成实体、仓储等步骤耗时数分钟),在 ABP 社区中有类似反馈,且官方已给出排查建议。

    • 该问题常见原因:

      1. 解决方案目录下存在大量无关文件(如 node_modules、bin、obj、.git 等),导致 Suite 在扫描和生成代码时极度缓慢。
      2. 代码生成时 ABP Suite 会递归遍历整个解决方案目录,若有大量大文件或无关目录,会严重拖慢速度。
    • 解决办法:

      1. 请确保你的解决方案目录下没有 node_modules、bin、obj、.git 等体积大或无关的目录。可以将这些目录移出解决方案目录,或在 .abpignore 文件中排除它们。
      2. 建议在 ABP Suite 代码生成前,清理无关目录,仅保留必要的项目文件。
      3. 参考官方支持帖的详细说明和后续建议:ABP Suite CRUD Generator: startIndex must be non-negative
    • 该问题并非 v9.2.3 升级特有,而是与目录结构和文件数量密切相关。清理目录后,代码生成速度会显著提升。


    参考链接(已验证):

    • https://abp.io/support/questions/9489

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

  • User Avatar
    0
    15021087273 created

    [AI-Bot] said:

    • 你遇到的 ABP Suite 代码生成极慢问题(如生成实体、仓储等步骤耗时数分钟),在 ABP 社区中有类似反馈,且官方已给出排查建议。

    • 该问题常见原因:

      1. 解决方案目录下存在大量无关文件(如 node_modules、bin、obj、.git 等),导致 Suite 在扫描和生成代码时极度缓慢。
      2. 代码生成时 ABP Suite 会递归遍历整个解决方案目录,若有大量大文件或无关目录,会严重拖慢速度。
    • 解决办法:

      1. 请确保你的解决方案目录下没有 node_modules、bin、obj、.git 等体积大或无关的目录。可以将这些目录移出解决方案目录,或在 .abpignore 文件中排除它们。
      2. 建议在 ABP Suite 代码生成前,清理无关目录,仅保留必要的项目文件。
      3. 参考官方支持帖的详细说明和后续建议:ABP Suite CRUD Generator: startIndex must be non-negative
    • 该问题并非 v9.2.3 升级特有,而是与目录结构和文件数量密切相关。清理目录后,代码生成速度会显著提升。


    参考链接(已验证):

    • https://abp.io/support/questions/9489

    This response was generated by AI. If it didn’t solve your problem, feel free to post a new answer — our support team will jump in to help you soon.

    以上使用的是测试项目,非老项目,不存在以上表述的存在大量无关文件等原因,还请技术支持帮忙看看。

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    你之前的suite版本是多少?

    可以试试降级到9.2.2 或 9.2.1

    你可以换一台电脑或者重启试试吗?

  • User Avatar
    0
    15021087273 created

    之前suite的版本是9.1.1,最近看到有更新就升级了一下Studio和Suite。 我尝试更换了项目模板为“Applicaton(Layered)”新建了一个新的项目,还是同样的类进行生成,时间控制在10分钟以内。后来又重新创建了一个Application(Single Layer)的项目,生成同样的类,时间长得离谱,居然呀47分钟才能生成完成。 我还是换成Layered Application模板来建项目吧,感觉是Abp Suite对于Single Layer的没有做好性能优化。

    另外想问一下,如果我想切换回之前的9.1.1版本,Abp Suite可以轻松切换,但是Abp Studio没找到位置,有没有Abp Studio V9.1.1版本的windows x64安装包的链接可以提供?

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    居然呀47分钟才能生成完成。

    每次都可以复现吗? 有详细的步骤吗?


    你应该可以使用最新的Studio和老版本的suite

  • User Avatar
    0
    15021087273 created

    刚才测试的AbpSolution4的Solution Configuration如下:

    • Template: app-nolayers
    • Created ABP Studio Version: 1.1.2
    • Current ABP Studio Version: 1.1.2
    • Multi-Tenancy: Yes
    • UI Framework: angular
    • Theme: leptonx
    • Theme Style: system
    • Theme Menu Placement: side
    • Run Install Libs: Yes
    • Database Provider: ef
    • Database Management System: sqlite
    • Create Initial Migration: Yes
    • Run Db Migrator: Yes
    • Social Login: No
    • Use Local References: No
    • Optional Modules:
      • GDPR
      • FileManagement
      • TextTemplateManagement
      • LanguageManagement
      • AuditLogging
      • OpenIddictAdmin
    • Selected Languages: English, 简体中文
    • Default Language: English
    • Create Command: abp new AbpSolution4 -t app-nolayers --ui-framework angular --mobile --database-provider ef --database-management-system sqlite --theme leptonx --no-tests --without-cms-kit --dont-run-bundling --no-social-logins -file-management

    以下是我测试过程中的截图: 1)命令行进入正常加载出来需要05:05 2)创建完成HelloWorld类,点Save and generate之后,出现1/10进度条的时间为04:30 3) 20%进度 4) 第九步的状态

    最终完成时,我手机记录的时间为47分30秒

  • User Avatar
    0
    15021087273 created

    [maliming] said:

    居然呀47分钟才能生成完成。

    每次都可以复现吗? 有详细的步骤吗?


    你应该可以使用最新的Studio和老版本的suite

    最新的Studio,创建的项目包版本是V9.2.3的,使用abp suite V9.1.1进行生成会提示版本不匹配生成失败。尝试将项目包版本手动降级到V9.1.1之后,项目就无法运行了,最好是能在创建项目时就指定使用的包版本是V9.1.1

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    我使用9.2.3 没有复现问题

    Starting Suite v9.2.3 ...
    Opening http://localhost:3000
    Press Ctrl+C to shut down.
    

  • User Avatar
    0
    15021087273 created

    怪了,可能是我硬件问题。

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    大概率是, 因为没有其他人反馈这个问题

Boost Your Development
ABP Live Training
Packages
See Trainings
Mastering ABP Framework Book
The Official Guide
Mastering
ABP Framework
Learn More
Mastering ABP Framework Book
Made with ❤️ on ABP v10.0.0-preview. Updated on September 18, 2025, 07:10