Migrate the intensive COM components to the managed code

xiaoxiao2021-03-06  120

.NET Framework provides a simple way to interact with traditional COM components. The advantage is that the new platform can be utilized while retaining existing investments. However, in some cases, the performance overhead of retaining the old assembly makes it worth migrating the components to the managed code. Each situation is different, deciding whether the best way to migrate components is to run performance measurements for Web sites. It is recommended that you study how to migrate any COM components that require a lot of calls to interact to the managed code.

Many cases it is not possible to migrate old components to managed code, especially when the web application is initially migrated. In this case, one of the largest performance disorders is to seal data from a non-hosting environment to the hosted environment. Therefore, in the interaction, please perform as many tasks as possible at any end, and then make a large call rather than a series of small calls. For example, all strings in the public language runtime are Unicode, so you should convert all strings in the components into Unicode formats before calling managed code.

In addition, any COM object or this resource is released. Thus, other requests can use them and minimize the performance issues caused by the release of garbage collectors later.

转载请注明原文地址:https://www.9cbs.com/read-101636.html

New Post(0)