Related article: Silverlight release optimization work (i)
Project Resources Optimization
Resources exist in Silverlight:
resource--resources are packaged inside the assembly
content--resources will be packaged in the XAP package.
none--resources are neither integrated into the assembly nor packaged into XAP packages. However, we can set the Copytooutputdirectory option to automatically copy to the directory where the XAP package resides.
Resource and content two kinds of disadvantage is caused XAP package is very large, one-time download to the client is slow. None generates the smallest XAP packages, which are downloaded by IIS using URIs as files, and are not downloaded after the first load into the Silverlight cache.
Resource invocation validation in the same project
Cache downloaded Picture Validation
A parent window has a picture of 3.jpg, the child window opened through the parent window has a picture penguins.jpg, the first time to open the load, will not load two more pictures.
Download time for three packaging methods:
1, resources under the Web, XAP and resource separation.
2, resources packaged to the Assembly, as packaged to xap both are download XAP, do not test.
Second, DLL optimization
This option is found when you view the Silverlight project properties.
1090K when unchecked.
After using the cache.
The load principle is required to control the size of the download file.
The advantage of packaging the DLLs in a XAP package is that if it is a multiple-project Silverlight, such as a solution with 2 Silverlight projects, So two projects contain system.windows.controls.zip this package, if not to extract these DLLs are separately packaged, two XAP package contains System.windows.control.dll, if extracted, then two XAP packets are reduced, you can remove a system.wi Ndows.control.dll redundancy.
Before the reduction:
After the decrease:
This method does not apply if OOB is used. You can also put common DLLs used by several projects into ClientBin. If you have other methods, welcome to the exchange.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.