Is the issue specific to when running in debug mode (when using Elm Reactor 
or compiling with --debug), by any chance? I recently encountered an issue 
where the debugger will scan through the entire model after every update, 
which is quite slow if there are large data structures in the model. I 
posted about the issue and my workaround on Reddit 
<https://www.reddit.com/r/elm/comments/628efv/avoiding_slowdown_when_using_the_debugger/>
.

On Monday, 3 April 2017 09:32:22 UTC-4, Jais Cheema wrote:
>
> Hi,
>
> I am currently working on a SPA which stores a list of records (~ 2500) 
> with 4 fields in the model. One of those fields is another list which 
> contains 2 items on average but can be more. 
>
> I am implementing a form component to create a new item, and the issue I 
> am seeing is that there is a very noticeable lag after every action. Form 
> does not deal with the previous mentioned list, but updates another record 
> which is a part of the list. Below is simplified version of my model code.
>
> type alias Parent =
>     { id: Int
>     , title: String
>     , children: List Child
>     }
>
> type alias Child =
>     { id: Int
>     , title: String
>     }
>
> type alias Form =
>     { title: String }
>
> type alias Model = 
>     { rootNodes: List Parent
>     , rootNodeForm: Maybe Form
>     }
>  
>
> Can someone please recommend how can I overcome this issue? Or even 
> pointers on what actions are expensive in Elm and I should be avoiding when 
> dealing with large amount of data in your model?
>
> Thank you in advance :)
>
> Cheers
> Jais Cheema
>

-- 
You received this message because you are subscribed to the Google Groups "Elm 
Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to elm-discuss+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to