Skip to content

Commit

Permalink
Merge branch 'docs/add_index_CN_trans' into 'master'
Browse files Browse the repository at this point in the history
Docs: add CN translation for api-guides/perfomance/index.rst

Closes DOC-5207

See merge request espressif/esp-idf!23716
  • Loading branch information
Oreokyle committed May 22, 2023
2 parents 72bf74f + ff16ce8 commit dab0e52
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
4 changes: 3 additions & 1 deletion docs/en/api-guides/performance/index.rst
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
Performance
===========

:link_to_translation:`zh_CN:[中文]`

ESP-IDF ships with default settings that are designed for a trade-off between performance, resource usage, and available functionality.

These guides describe how to optimize a firmware application for a particular aspect of performance. Usually this involves some trade-off in terms of limiting available functions, or swapping one aspect of performance (such as execution speed) for another (such as RAM usage).

How to Optimize Performance
---------------------------

1. Decide what the performance-critical aspects of your application are (for example: a particular response time to a certain network operation, a particular startup time limit, particular peripheral data throughput, etc.).
1. Decide the performance-critical aspects of your application, such as achieving a particular response time for a certain network operation, meeting a particular startup time limit, or maintaining a certain level of peripheral data throughput.
2. Find a way to measure this performance (some methods are outlined in the guides below).
3. Modify the code and project configuration and compare the new measurement to the old measurement.
4. Repeat step 3 until the performance meets the requirements set out in step 1.
Expand Down
26 changes: 25 additions & 1 deletion docs/zh_CN/api-guides/performance/index.rst
Original file line number Diff line number Diff line change
@@ -1,2 +1,26 @@
.. include:: ../../../en/api-guides/performance/index.rst
性能
====

:link_to_translation:`en:[English]`

ESP-IDF 预设了默认设置,旨在在性能、资源使用和可用功能之间进行权衡。

本指南详述了如何优化固件应用程序,以提高特定方面的性能。这一过程通常涉及到性能之间的权衡,例如限制部分可用功能,或者牺牲某性能以满足另一性能的要求,例如通过使用更多内存换取更快的运行速度。

如何优化性能
------------

1. 确定应用程序的关键性能要求,例如控制某个网络操作的响应时间、控制启动时间、或在某个外设中实现特定的数据吞吐量。
2. 确定衡量该性能的方法(下文指南中概述了一些方法)。
3. 修改代码和项目配置,比较新旧测量结果。
4. 重复第三步,直到性能达到第一步中设定的要求为止。

指南
----

.. toctree::
:maxdepth: 2

执行速度 <speed>
二进制文件大小 <size>
内存使用 <ram-usage>

0 comments on commit dab0e52

Please sign in to comment.