cancel
Showing results for 
Search instead for 
Did you mean: 

How to Reduce SAP Business one Addon Memory Consumption

mk1909_sap
Active Participant
0 Kudos

Hello All,

My SAP Business One Add-on Consumes More than 200MB Memory. I want to reduce it to 10 MB approx..Is there any option for the same? I have Developed Add-on in VB.net.

Thanks and Regards,

Mahendrakumar

Accepted Solutions (1)

Accepted Solutions (1)

former_member233854
Active Contributor
0 Kudos

Hi,

I guess that you are using the old method to connect to DI API. When you are connecing to DI use the following method if you are not using

oCompany = (SAPbobsCOM.Company)SBO_Application.Company.GetDICompany();
mk1909_sap
Active Participant
0 Kudos

Hello Danilo,

Kindly do let me other method to initialize the company object other than GetDICompany() method? Yes I am using the same method.

Thanks,

Mahendrakumar

former_member233854
Active Contributor

The other one is the old way which increase the memory consumption, if you are using this one this is not the problem

Answers (2)

Answers (2)

pedro_magueija
Active Contributor

Hi Mahendrakumar,

When dealing with performance issues (be it speed, memory consumption, etc...) you ALWAYS have to use a profiler to check exactly what in your application is causing the issue.

Without using a profiler everything is guesswork.

Get yourself a memory profiler and have it analyze your application when it's running.

Identify the objects taking up the memory and then invest in optimizing those objects.

Good luck.

Pedro Magueija

LinkedIn | Twitter | Blog

former_member185682
Active Contributor

Hi Mahendrakumar,

It is a generic question. You need identifies in what part of code your add-on consumes more memory and dispose the objects after you use it, there is no generic approach to reduce the memory usage.

Kind Regards,

Diego Lother

mk1909_sap
Active Participant
0 Kudos

Hi Diego,

I Released all the Objects after use using following code

System.Runtime.InteropServices.Marshal.ReleaseComObject("My Object")

GC.Collect()

then also Add-on consumes lots of memory in task manager.

Thanks and Regards,

Mahendrakumar

former_member185682
Active Contributor
0 Kudos

Unfortunately you need debug your code and find in what point of your code your memory is increased. After you find this, post the piece of code here. So, we are able to help you.

Kind Regards,

Diego Lother

mk1909_sap
Active Participant
0 Kudos

Hello Diego,

Thanks for reply. I will Debug my code and let you know.

Mahendrakumar