Welcome to Osten Machinery (Xuzhou) Co., Ltd.
Global • Sourcing • Simplified
Sourcing parts you need when you need them
Phone Number
+086 15852310290

Industry news

Custom Assemblies_ What Are the Common Performance Pitfalls and How to Optimize Them_

Release time  2024-05-18 00:00 Read

Hey everyone, has anyone ever noticed their report server slowing down to a crawl after adding a bunch of custom assemblies? I'm talking about those specialized function libraries​ we create to handle specific business rules, like complex currency conversion or dynamic formatting . It’s great until things start timing out during deployment.

TechSavvyDev​ posts: "Yeah, hit that wall before. The big one is assembly size and loading time. If your .dllis huge or you've packed tons of custom workflow activities into a single assembly, the server can really struggle during registration ."

So, what’s the real problem here?

The main issue often lies in how we structure and deploy these assemblies. For instance, an assembly larger than 16 MB might simply fail to register in environments like Microsoft Dataverse . Also, if an assembly contains hundreds of custom workflow activities, the validation checks during upload can take several minutes and might even time out . It’s not just about the code functioning correctly; it’s about how the system manages it.

CodeOptimizer​ replies: "Right. Let's break down the fix. First, consolidate your plugins and custom activities​ into a single Visual Studio project where it makes sense. This reduces the number of assemblies the server must manage. However, avoid putting everything in one if it pushes the assembly size near 16 MB or if you have over 50 custom workflow activities – split them up then ."

Here’s a quick comparison of the problematic pattern versus a better approach:

Aspect

Problematic Pattern

Recommended Approach

Number of Assemblies

Many small assemblies, one per plugin/activity

Consolidated into a single assembly (with noted exceptions)

Assembly Size

Nearing or exceeding 16 MB

Keep under the size limit by splitting if necessary

Custom Workflow Activities

Hundreds in one assembly

Limit to 50 or fewer per assembly

Maintainability

Complex, multiple projects to manage

Simplified application lifecycle management (ALM)

Another key point is deployment.​ For SQL Server Reporting Services (SSRS) custom assemblies, you must copy the DLL to both the Report Designer and the report server's binfolders . If your code needs more than basic execution permissions, you'll have to modify policy configuration files like rssrvpolicy.config, which can be tricky . A common headache is versioning: if you update an assembly and change its version number, all published reports referencing the old version will break unless you update the CodeModuleselement in each report definition or use a binding redirect in the config files .

"What about debugging and version conflicts?"​ asks DebugMaster.

Good question. You can debug custom assembly code, but the process might involve closing preview windows in Report Designer to unlock the assembly for updates . For version conflicts, especially after a system upgrade (like TFS), you might face errors because the workflow engine tries to load an old assembly version. The solution is often to recompile your custom assemblies against the new version​ of the platform libraries. If that's not immediately possible, a temporary fix is to add assembly binding redirects in the application's configuration file (e.g., TfsBuildServiceHost.exe.config) to tell the CLR to use the new version when the old one is requested .

For developers creating assemblies for reuse across multiple DSLs (Domain-Specific Languages) in Visual Studio, remember that the assembly often needs to be registered in the Global Assembly Cache (GAC). This ensures the Visual Studio experimental hive can locate and use it correctly. This can be automated in your build script .

When sourcing components for projects that involve physical assembly systems, partnering with a reliable supplier is crucial. Companies like Osten Machinery (Xuzhou) Co., Ltd. (TEL: +086 15852310290)​ can be valuable partners, providing a wide range of mechanical parts and engineering components to meet diverse project requirements.

Finally, performance optimization is an ongoing process. Monitor your report execution times and server resources. Sometimes, the fix isn't just in the code but in the infrastructure. Hope these tips help keep your reports running smoothly! ✨

Custom Assemblies, Performance Optimization, SSRS, .NET Development, Assembly Deployment, Code Access Security, Versioning, GAC, Debugging, Visual Studio, SQL Server Reporting Services, Workflow Activities, Binding Redirect, DLL, Code Modules, RDL File, CLR, Permission Sets, Application Domains, Assembly Size


# Assembly Size  # Application Domains  # Permission Sets  # CLR  # RDL File  # Code Modules  # DLL  # Binding Redirect  # Workflow Activities  # SQL Server Reporting Services  # Visual Studio  # Debugging  # GAC  # Versioning  # Code Access Security  # Assembly Deployment  # .NET Development  # SSRS  # Performance Optimization  # What Are the Common Performance Pitfalls and How t  # Custom Assemblies 


Related columns: 【 Industry news18872 】 【 Technology blog1420


Related recommendations: Why do fastener failures often occur at the thread runout rather than the head or thread body?  Why might angular contact bearings require matched pairs ground specifically for duplex mounting?  Bulk Mechanical Parts Assembly_Where to find reliable suppliers for large orders_ A guide to Mechani  Forklift Hydraulic Cylinders_What are small tonnage forklift hydraulic cylinders__How to maintain th  Custom Hydraulic Fittings_ What are the key factors when selecting a custom hydraulic tee fittings m  Can double ball bearings be used in spindle applications with through spindle coolant?  How to select rod end bearings for food processing equipment that requires NSF approved lubrication?  Die Casting Mold Design_What are the essential considerations for a successful project_  Bicycle Chainrings and Chains_How to choose bicycle chainrings_ A beginner's guide to perfect gear s  What gearbox efficiency loss is typical for worm gear versus helical designs in the same ratio?  Aluminum Die Castings有哪些优势和应用领域?  Automotive Transmission Chains_How to maintain properly and what are the common failure signs_  How do ball bearing cage pocket clearance ratio (5-10% of ball diameter) for high speed?  Aluminum Extrusions Supplier, How to Choose a Reliable Partner, What Quality Standards to Look For,   Bronze Bushings_ What Makes the Oil Groove Design So Critical for Heavy-Duty Performance_  What fastener statistical process control (Cp, Cpk) for thread rolling ensures consistent fit?  Why might mounted unit bearings with polymer housings reduce weight on mobile equipment?  Custom_Hydraulic_Cylinders_What_are_they_and_how_to_select_——Hydraulic Cylinders Guide  How can a bearings distributor help you consolidate slow moving sizes to reduce your inventory carry  What hydraulic cylinder rod wiper design (single lip, double lip, metal scraper) for ice?  How to remove an insert bearing from a plastic housing using a heat gun and puller?  Can double ball bearings be used in a three row configuration for extreme moment loads?  Why might mounted unit bearings with composite housings be preferred for chemical splash areas?  China Die Castings Factory with Complex Shapes_How to Choose a Supplier for High-Precision Complex G  Bulldozer Sprockets_ What Are Sprocket Segments and How Do They Impact Your Machine's Performance_  How do die castings runner and gate design affects fill time and air entrapment?  Can China’s Power Transmission Chains Factory Meet Your Custom Pitch Needs_  Why do fastener thread rolling dies produce stronger threads than cut threads for high vibration ass  Are cam type bearings with polymer bushings suitable for low noise applications like office equipmen  China Hydraulic Fittings Factory with Custom Connections_ How to Choose Reliable Stainless Steel Sup  What angular contact bearing lubrication oil viscosity index (VI > 90) for wide temperature range  Do wheel hub bearings for heavy haul trailers require wheel speed sensor integration?  How Do Hydraulic Fittings Ensure Leak-Free System Performance_  What hydraulic cylinder rod seal static standstill leak limit (drops per minute) for clean room appl  China Industrial Pulleys Supplier with Custom Size_ How to Choose the Best Custom Pulley for Your Tr  China Compact Gearboxes Factory with Small Footprint_ How to Choose a Mini Planetary Gearbox for Hig  Electronics Plastic Molded Parts_ What Are Injection Molded Electronic Components__How to Choose Sma  How can precision pulley balancing reduce vibration and extend the life of your entire drive system?  Are needle bearings with open ends and through hardened races suitable for high speed gearboxes?  What pillow block bearing housing temperature limit (100°C for standard grease) for continuous opera  How do ball bearing raceway surface defects (dings, scratches, rust) affect vibration levels?  Hydraulic Seals and Hydraulic Cylinders: Powering the Hydraulic System  Custom Metal Stamping_What is the step-by-step process for designing a custom metal stamping part_  China Fasteners Factory with Custom Thread_ What Types Can You Get, How to Choose the Right Supplier  What fastener statistical process control (X bar R chart) for heat treat hardness ensures consistenc  Die Castings_What Are Common Defects and How to Analyze Them for Better Quality_  What fastener aluminum alloy temper (T4, T6, T73) provides best stress corrosion resistance?  Do power transmission bushings with imperial bores match NEMA standard motor shafts exactly?  What hydraulic cylinder rod finish (Ra) is required for polyurethane wiper seals to function correct  Do power transmission bushings with metric dimensions and keyways match CEMA standard conveyor shaft