延迟初始化的主要弊端是,由于要查看属性是否已定义,如果没有,则得到它的值,这会使代码变得更复杂。
The main disadvantage of lazy initialization is your code becomes more complex because you need to check to see if the attribute has been defined yet and, if not, obtain its value.
延迟初始化的主要缺点是:代码将变得更复杂,因为需要查看是否定义了属性,如果还未定义,则要获取属性值。
The main disadvantage of lazy initialization is that your code becomes more complex because you need to check to see if the attribute has been defined yet and, if not, obtain its value.
这两者都体现了延迟初始化的特性(因此又被称为futures)。前者是一个类,而后者则是一个轻量的,但并非“绝对”线程安全的结构。
Both support the idea of deferred initialization, also known as futures, the former is a class and the later a lightweight and slightly less safe structure.
一种在应用程序的时间敏感型部分避免类加载延迟通用技术是,在应用程序启动或初始化期间预先加载类。
A generic technique to avoid class-loading delays during the time-sensitive parts of your application is to preload classes during application startup or initialization.
单元素模式可以用来尽可能久地延迟对象的初始化。
The singleton pattern can be used to delay the initialization of an object as long as possible.
最后,利用框架上下文接口公开一个启动方法,从而将延迟获取模式应用在服务的初始化中。
Finally, lazy acquisition pattern was applied to the initialization of services by exposing a startup method with the framework context interface.
延迟初始化:如果初始化成本过高,有时推迟初始化的过程是很有用的。
Lazy initialization: it sometimes makes sense to defer initialization if the cost of initialization is significant.
通过延迟对appointment类的构建和初始化,简化了对附加包装行为(比如持久性)的分离。
By deferring construction and initialization to the Appointment class, I make it easier to separate additional wrapping behavior (such as persistence).
理想的解决方法通常是,让您的插件延迟它的初始化,直到用户请求您的产品的某个特定的动作时再初始化。
The ideal solution is often for your plug-in to defer its initialization until the user requests a specific action of your product.
在应用程序发送方和接收方上的初始化过程和网络上的延迟进一步影响了这些方面。
These are further influenced by initialization procedures on both sides of the application and on latency effects of the network.
内存结构的滞后初始化可以节省CPU时间并延迟其他插件的激活。
Lazy initialization of memory structures will save CPU time and may defer the activation of other plug-ins.
在无状态的设计中,必须确保完全由数据层填充对象,并且正确地初始化任何与显示其详细内容有关的延迟加载。
In a stateless design, you must ensure that objects are fully populated by the data layer and that any lazy associations that are needed to show its details are properly initialized.
借助于Wicket的TestPanelSource类,我们可以根据测试需要延迟初始化给定的面板。
By using Wicket's TestPanelSource class we can lazily initialize a given panel for testing purposes.
选择英雄的速度更加快了。大量减少了在JASS语言基本单位初始化创造时所造成的感官延迟。
Much faster hero selection. General reduction in observable lag throughout the game with JASS based unit creation.
hmi功能在初始化过程中是不可能的未决报文的输出将延迟。
HMI functions are not possible during initialization. Outputting of pending messages is delayed.
针对上述问题,提出一种责任链设计模式创建过程,利用延迟初始化技术减少不必要的请求处理者数量。
Aiming at the problems, a CoR creating process is presented, which uses delay initialization technology to reduce unnecessary requests for the creation of the treatment process.
主要讨论在网络差错控制中,异步总线的延迟不敏感编码的基于比较的实现问题,即校验码的位数≥数据的位数;另外编码还必须满足初始化条件。
The article introduces the implementation issues of asynchronous logic underlying comparison-based error control for systematic delay-insensitive codes in the networks.
初始化是延迟加载的,所以创建一个实例的是不完全满足初始化发生的条件的。
Initialization occurs lazily, so creating an instance of the context is not enough to cause initialization to happen.
初始化是延迟加载的,所以创建一个实例的是不完全满足初始化发生的条件的。
Initialization occurs lazily, so creating an instance of the context is not enough to cause initialization to happen.
应用推荐