Something with hotchoclate library just makes Visual Studio freeze at 100% CPU so that we have to kill VS and reopen.
It happens over and over again. After a short moment of coding VS just freezes up.
(https://chillicream.com/docs/hotchocolate/v13)
Situation
MS Web APU project with hotcholcolate (HC) graphql v13. we changed into using annotation-based HC types.
Our Entity Framework Core classed are extended using ExtendObjectType<myClass>
and our resolvers go there.
We also use the HotChocolate.DataLoaderAttribute
that generates loader code for us, in HotChocolateDataLoader.g.cs
class. Like:
[DataLoader]
public static async Task<IReadOnlyDictionary<Guid, Person>> GetPersonBatchAsync(
Problem
And this is where the problem is. After making 30-40 extension classes and a few dataloader classes, my Visual Studio just freezes after a few minutes of editing files with ExtendObjectType
or DataLoaderAttribute
.
The freeze only happens if I edit an extension class (ExtendObjectType<myClass>
) or a class with [DataLoader]
. Both of these types will make HC regenerate these two files in the background: HotChocolateDataLoader.g.cs
and HotChocolateTypeModule.g.cs
.
In lower left corner of VS I can see status "running low priority background process. Evaluating (4 tasks in queue)", and this stays on forever until i kill VS process, that is running 100% CPU forever.
Right after starting VS I can see that background process complete fine with "Loading Intellisense. Loaded", "Indexing files in mySolution" and "Project loaded and ready to use".
So, something must be wrong with HC library?
We started experiencing this after our project became a certain size as mentioned.
Earlier on in project we had no problems with HC, but then we used only Code-First notation. Lots of resolvers and batchdataloaders. Problem free.
Someone else must have experienced this? So far we find nothing we can do with today's situation. Does anyone have any tips?