`
javalion
  • 浏览: 13569 次
最近访客 更多访客>>
社区版块
存档分类
最新评论

tune部分段落翻译

阅读更多

大部分能看明白,表达不够明确或者相当错误,还请各位达人帮忙纠错

Chapter 1. 介绍
The trouble with doing something right the first time is that nobody appreciates how difficult it was.
--Fortune

第一次做事情遇到麻烦是因为没有人理解这事儿有多困难。

There is a general perception that Java programs are slow. Part of this perception is pure assumption: many people assume that if a program is not compiled, it must be slow. Part of this perception is based in reality: many erly applets and applications were slow, because of nonoptimal coding, initially unoptimized Java Virtual Machines(VMs), and the overhead of the language.

通常认为Java程序运行非常慢。这种理解是纯粹的假设:许多人假定如果一个程序没有被编译,它一定很慢。而这个理解又来自于现实:很多早期的applets和applications运行很慢,因为并非最佳的编码,没有优化的Java虚拟机,和间接的语言。

In earlier versions of Java, you had to struggle hard and compromise a lot to make a Java application run quickly. More recently, there have been fewer reasons why an application should be slow. The VM technology and Java development tools have progressed to the point where a Java application (or applet, servlet, etc.) is not particularly handicapped. With good designs and by following good coding practices and avoiding bottlenecks, applications usually run fast enough. However, the truth is that the first (and even several subsequent) versions of a program written in any language are often slower than expected, and the reasons for this lack of performance are not always clear to the developer.

早期版本的Java,程序员们不得不努力地并做出很多妥协让Java application快速运行。最近,只有很少的原因使程序运行变慢。虚拟机技术和Java开发工具的发展使得Java程序并不存在显著的缺陷。通过良好的设计并遵循良好的编码规范并避免瓶颈的出现,程序通常运行得足够快。然而,事实上第一个(甚至之后的几个)用任何语言说编写的程序的运行通常都比预期的要缓慢,导致缺乏性能的原因并不是每个开发人员都清楚。

This book shows you why a particular Java application might be running slower than expected, and suggests ways to avoid or overcome these pitfalls and improve the performance of your application. In this book I've gathered several years of tuning experiences in one place. I hope you will find it useful in making your Java application, applet, servlet, and component run as fast as you need.

本书说明了为什么某个特定的Java应用程序可能运行得比预期的要慢,并提出了一些避免或者克服这些缺陷并提升应用性能的方法。本书中,我已经在一个地方搜集了数年的调整经验。我希望这对使你的Java应用程序,applet, servlet和组件运行更快有帮助。

Throughout the book I use the generic words "application" and "program" to cover Java applications, applets, servlets, beans, libraries, and really any use of Java code. Where a technique can be applied only to some subset of these various types of Java programs, I say so. Otherwise, the technique applies across all types of Java programs.

本书所有内容,我使用了一般性的词组"application"和"program"来代替Java应用程序,applets, servlets, beans, libbraries, 和所有实际的任何Java代码的应用。这个技术可应用到Java程序的一些子集中。另外,该技术适用于所有类型的Java程序。

1.1 Why Is It Slow?
This question is always asked as soon as the first tests are timed:"Where is the time going? I did not expect it to take this long." Well, the short answer is that it's slow because it has not been performance-tuned. In the same way the first version of the code is likely to have bugs that need fixing, it is also rarely as fast as it can be. Fortunately, performance tuning is usually easier than debugging. When debugging, you have to fix bugs throughtout the code; in performance tuning, you can focus your effort on the few parts of the application that are the bottlenecks.

它为什么这么慢?这个问题经常在第一次测试后就被问及:“这些时间在干吗?我并不希望它花这么长时间。” 好,简短的回答是它这么慢是因为它并没有被调整性能。即便这个代码的第一个版本可能有没有修复的bugs,它也可以以罕见的速度运行。幸运地是,性能调整通常比调试简单。调试时,你不得不去修复代码中所有的bugs;而在性能调整里,你只要集中注意,关注应用程序的少数几个方面,而这少数的方面往往就是瓶颈。

The longer answer? Well, it's true that there is overhead in the Java runtime system, mainly due to its virtual machine layer that abstracts Java away from the underlying hardware. It's also true that there is overhead from Java's dynamic nature. These overheads can cause a Java application to run slower than an equivalent application written in a lower-level language (just as a C program is generally slower than the equivalent program written in assembler). Java's advantages-namely, its platform-independence, memory management, powerful exception checking, built-in multithreading, dynamic resource loading, and security checks-add costs in terms of an interpreter,  garbage collector, thread monitors, repeated disk and network accessing, and extra runtime checks.

详细点儿的回答?那么,是不是真的有一套顶层的Java运行系统,主要由于它的虚拟机层将Java从底层硬件中抽象出来。它也确实间接地来自于Java的动态性。这些间接性导致Java应用程序比相对应地使用底层语言(比如C语言通常要比相对应汇编程序运行地慢)写的应用程序要运行地更慢。Java地优势,即平台无关性,内存管理,强大地异常检查,内建的多线程,动态资源加载,解释期间的安全检查的成本,垃圾收集,线程监视器,重复硬盘和网络访问,以及额外的运行时检查。

分享到:
评论

相关推荐

    nokia tune.zip

    Gran Vals org.wma Nokia tune 2011(Bella N9).mp3 Nokia Tune 2013.mp3 nokia tune all.mp3 Nokia tune remix(2011获奖版).mp3 Nokia tune_1994.wav Nokia tune_2005.wav Nokia tune_2008.wav

    HD Tune免安装中文版

    HD Tune是一款广受好评的硬盘诊断工具,专为用户提供硬盘健康状态检查和性能测试。这款中文免安装版的特性使得用户无需经历繁琐的安装过程,即可直接使用,方便快捷。以下将详细介绍HD Tune的主要功能、用途及其在...

    HDTunePro 5.5 硬盘检测工具

    《HDTunePro 5.5:硬盘检测与健康管理的得力助手》 HDTunePro 5.5是一款高效且全面的硬盘检测工具,专为电脑用户设计,旨在帮助他们深入了解硬盘的工作状态,及时发现并预防可能出现的问题。这款软件以其易用性和...

    硬盘检测工具hdtunepro

    在“基准”部分,用户可以进行硬盘速度测试。选择起始和结束位置,点击开始,软件会读取选定区域的数据并计算平均速度,结果将以图表形式展示。这有助于判断硬盘的读取速度是否正常。同时,“随机存取”测试能评估...

    硬盘检测工具 HD_Tune 5 免费中文版 及 使用教程

     AAM的英文全称为Automatic Acoustic Management,翻译成中文意思是——自动声音管理。硬盘的噪音大多由于本身的震动和磁头的不断操作产生,换言之在相同的环境下,硬盘的转速越高,噪音越大。而此项功能实际上就是...

    HdTunepro3

    日前,该公司对HD Tune进行了大规模升级,新推出的HD Tune Pro首个版本号即为3.0版,今后可能会采取普通版HD Tune 2.xx和HD Tune Pro 3.xx的两线升级路线。 HD Tune Pro相对之前HD Tune 2.55的升级包括: 传输速率...

    HDTune 硬盘检测工具

    【HDTune 硬盘检测工具】 HDTune是一款高效、易用的硬盘检测工具,主要用于硬盘健康状况检查、性能测试以及故障诊断。这款软件适用于个人用户和专业技术人员,可帮助他们对计算机的硬盘进行深入分析,确保数据的...

    硬盘检测工具HD Tune专业版5.6

    标题中的“硬盘检测工具HD Tune专业版5.6”指的是一个专门用于检查和分析硬盘性能的专业软件。HD Tune是一款广受好评的硬盘诊断工具,它提供了多种功能来帮助用户了解硬盘的健康状况、性能和潜在问题。专业版通常...

    HDTunePro5.0

    此外,部分硬盘支持节能模式,HDTunePro5.0允许用户调整这些设置,以平衡硬盘性能与能耗。 五、其他实用功能 除了以上主要功能,HDTunePro5.0还提供了其他实用特性,例如硬盘信息查看,显示硬盘的基本信息,如品牌...

    HDTunePro4.5

    《HDTunePro4.5:硬盘检测与性能优化的专业工具》 HDTunePro4.5是一款专门针对硬盘性能测试、健康检查和故障诊断的软件,尤其在IT行业内广泛被技术人员所使用。这款工具以其易用性、全面性和准确性赢得了用户的好评...

    Hd tune 专业版5.0

    《硬盘检测与坏道修复:深入理解Hd Tune专业版5.0》 在IT领域,数据安全至关重要,而硬盘作为存储数据的核心设备,其健康状况直接影响到数据的完整性和可靠性。Hd Tune专业版5.0是一款强大的硬盘检测与坏道修复工具...

    HDTunePro 磁盘工具

    HDTunePro,HDTunePro,HDTunePro,HDTunePro,HDTunePro,HDTunePro

    HDtune硬盘检测工具

    HDtune是一款强大的硬盘检测工具,它为用户提供了一种便捷的方式来检查和监控硬盘的状态,确保数据的安全性。这款工具在IT行业中被广泛使用,尤其对于系统管理员和电脑维修人员来说,是必不可少的诊断工具之一。 ...

    HdTune 绿色版

    【HdTune 绿色版】是一款高效且实用的硬盘检测工具,专为用户提供硬盘健康状况、性能测试、错误扫描等功能。它以其简洁的操作界面和强大的功能,在IT业界获得了广泛的认可。这款绿色版无需安装,下载后直接运行,...

    HDTunePro_5.60.zip

    《HDTune Pro 5.60:硬盘性能检测利器》 HDTune Pro是一款备受赞誉的硬盘检测和诊断工具,版本号5.60,主要用于评估硬盘的健康状况、性能以及提供数据安全相关的功能。它以其简洁的操作界面和强大的功能,深受广大...

    HD Tune Pro 5.5 汉化破解版

    HD Tune Pro 5.5 汉化破解版(支持Win8)- 专业的硬盘测试必备工具 大眼仔版

    auto tune pro v9.1ce 自动电音9.1版本套装

    在音乐制作领域,尤其是流行音乐和电子音乐中,电音效果的运用已经成为了不可或缺的一部分。Auto-Tune Pro v9.1 CE,这款专为歌唱设计的插件,以其卓越的音质和强大的功能,深受广大音乐制作人和歌手的喜爱。本文将...

    JBL Tune 120TWS用户配置手册.pdf

    JBL Tune 120TWS 用户配置手册 JBL Tune 120TWS 用户配置手册是 JBL 公司发布的一款真正无线入耳式耳机的用户手册,该手册详细介绍了 JBL Tune 120TWS 的产品特点、技术规格、性能优势和使用方法等内容。 JBL Tune...

    HD TUNE v2.54硬盘实用工具

    5. **温度监控**:部分版本的HD TUNE还提供了硬盘温度监控,过高的温度可能影响硬盘的寿命和稳定性,所以保持合适的硬盘温度非常重要。 6. **基准测试**:除了上述功能,HD TUNE还可以进行基准测试,通过读取大量...

Global site tag (gtag.js) - Google Analytics