Hello, I’m using the free version via this plugin https://github.com/ogobrecht/apex-plugin-dhtmlx-gantt and at some point when I load around 100~ rows of data into my gantt - memory starts leaking( the full ram memory is being used and the browser/pc starts crashing). I managed to repeat it in multiple browsers and environments. I have no idea what is causing it. The source code for the plugin is present in the github link and I’m wondering if I there is something I could to fix the issue and at some point include the Pro version in it and use it for my company after I’m done testing.
Hello,
First, I see that you have an old Gantt version. Since the 7.0.11 version, there have been many performance improvements:
https://docs.dhtmlx.com/gantt/whatsnew.html
Tried to reproduce the issue in the following link that I found in the readme file:
https://apex.oracle.com/pls/apex/ogobrecht/r/playground/gantt-chart
I load 1000 tasks with the following code:
gantt.clearAll()
var tasks = [];
for(var i = 1; i < 1000; i++) {
tasks.push({
text: `Task ${i}`,
id: i,
start_date: new Date(2025,0,i),
duration: 1,
});
}
gantt.parse({ data: tasks });
When I check the memory tab, I only see around 12-20Mb usage. If I drag a task or try to make the changes, the task data is reloaded, so I had to generate new tasks again. And still, the issue is not reproduced there.
You can try adding a newer Gantt version and check if the issue is still reproduced.
If that doesn’t help you, please give me the exact steps to reproduce the issue.
Hello Ramil,
You are right, loading data via javascript this way is completely fine. I think the problem may lie in the sql functions that the plugin is executing to get the data from the database. If it’s within your reach I would appriciate a little help on how to fix it but you helped alot with narrowing down the problem. Thank you.
Hello,
DHTMLX Gantt is a client-side library. It doesn’t directly communicate with the database, nor does it send SQL requests. The requests can be sent by the server-side part or some 3rd-party library, then the data can be loaded into Gantt with the parse
or load
methods:
https://docs.dhtmlx.com/gantt/desktop__loading.html
I see that you use the plugin-source.sql
file to call the Gantt code and load the files. If it loads the files every time you do something in Gantt, it may be a wrong approach as the browser may load all the files again and again and store them somewhere in the memory.
But as APEX platform itself is beyond our support, I cannot suggest to you what you need to change in your code.
If you want us to help you to integrate Gantt into your environment, you can contact the Sales team:
info@dhtmlx.com