You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was reading this issue in closed issues section and i was facing the same issue in my project as well
We are unable to build the project in 16GB RAM.
It takes more then hour in local machine mostly.
On server it doesn't even compile and runs out of memory.
Suggestion
When we tried to build our project with -v argument then it takes too much RAM for gen (gen = ent generated code folder) folder compilation or sometimes it takes too much RAM in some other folder which is using gen folder
so,
if we can move the schema table specific files from the gen directory to respective schema table folders in gen then it will not compile all together and memory usage will be reduced
In gen folder probably 5 files are generated per schema table and we have around 257 schema tables in database and we have generated 5 files per table so there will be more then 257*5=1285 files in gen folder only and there is a mutation.go file which takes so much time and RAM(my local machine hangs with SSD and 16GB RAM) just to open it in the editor(IntelliJ).
So if we can move the specific files to their respective folder then it might not compile all together and may compile folder by folder so it will take lesser RAM to compile
I was reading this issue in closed issues section and i was facing the same issue in my project as well
We are unable to build the project in 16GB RAM.
It takes more then hour in local machine mostly.
On server it doesn't even compile and runs out of memory.
Suggestion
When we tried to build our project with -v argument then it takes too much RAM for gen (gen = ent generated code folder) folder compilation or sometimes it takes too much RAM in some other folder which is using gen folder
so,
if we can move the schema table specific files from the gen directory to respective schema table folders in gen then it will not compile all together and memory usage will be reduced
In gen folder probably 5 files are generated per schema table and we have around 257 schema tables in database and we have generated 5 files per table so there will be more then 257*5=1285 files in gen folder only and there is a mutation.go file which takes so much time and RAM(my local machine hangs with SSD and 16GB RAM) just to open it in the editor(IntelliJ).
So if we can move the specific files to their respective folder then it might not compile all together and may compile folder by folder so it will take lesser RAM to compile
Go Version 1.21
Driver MySql
Ent 0.12.4
The text was updated successfully, but these errors were encountered: