Skip to Content
0

How to Reduce SAP Business one Addon Memory Consumption

Jun 28, 2017 at 01:18 PM

131

avatar image

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

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Pedro Magueija Jun 29, 2017 at 06:06 AM
2

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

Share
10 |10000 characters needed characters left characters exceeded
DIEGO LOTHER Jun 28, 2017 at 01:28 PM
1

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

Show 3 Share
10 |10000 characters needed characters left characters exceeded

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

0
Mahendrakumar Phadtare

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

0

Hello Diego,

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

Mahendrakumar

0
Danilo Kasparian Jun 28, 2017 at 01:33 PM
0

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();
Show 2 Share
10 |10000 characters needed characters left characters exceeded

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

0

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

0