Re: What is the memory usage of my app?

2015-04-18 Thread Adil via Digitalmars-d-learn
On Friday, 17 April 2015 at 14:50:29 UTC, Márcio Martins wrote: On Friday, 17 April 2015 at 14:49:19 UTC, Márcio Martins wrote: On Thursday, 16 April 2015 at 12:17:24 UTC, Adil wrote: I've written a simple socket-server app that securities (stock market shares) data and allows clients to query

Re: What is the memory usage of my app?

2015-04-17 Thread via Digitalmars-d-learn
On Thursday, 16 April 2015 at 12:17:24 UTC, Adil wrote: I've written a simple socket-server app that securities (stock market shares) data and allows clients to query over them. The app starts by loading instrument information from a CSV file into some structs, then listens on a socket respondi

Re: What is the memory usage of my app?

2015-04-17 Thread via Digitalmars-d-learn
On Friday, 17 April 2015 at 14:49:19 UTC, Márcio Martins wrote: On Thursday, 16 April 2015 at 12:17:24 UTC, Adil wrote: I've written a simple socket-server app that securities (stock market shares) data and allows clients to query over them. The app starts by loading instrument information from

Re: What is the memory usage of my app?

2015-04-17 Thread Adil via Digitalmars-d-learn
On Thursday, 16 April 2015 at 20:33:17 UTC, Marc Schütz wrote: On Thursday, 16 April 2015 at 17:13:25 UTC, Laeeth Isharc wrote: For CSV files, what I found is that parsing is quite slow (and memory intensive). If your sure that CSV reading is the culprit, writing a custom parser could help. I

Re: What is the memory usage of my app?

2015-04-17 Thread Adil via Digitalmars-d-learn
On Thursday, 16 April 2015 at 17:13:25 UTC, Laeeth Isharc wrote: Fwiw, I have been working on something similar. Others will have more experience on the GC, but perhaps you might find this interesting. For CSV files, what I found is that parsing is quite slow (and memory intensive). So rath

Re: What is the memory usage of my app?

2015-04-16 Thread via Digitalmars-d-learn
On Thursday, 16 April 2015 at 17:13:25 UTC, Laeeth Isharc wrote: For CSV files, what I found is that parsing is quite slow (and memory intensive). If your sure that CSV reading is the culprit, writing a custom parser could help. It's possible to load a CSV file with almost no memory overhead.

Re: What is the memory usage of my app?

2015-04-16 Thread Laeeth Isharc via Digitalmars-d-learn
Fwiw, I have been working on something similar. Others will have more experience on the GC, but perhaps you might find this interesting. For CSV files, what I found is that parsing is quite slow (and memory intensive). So rather than parse the same data every time, I found it helpful to do

Re: What is the memory usage of my app?

2015-04-16 Thread via Digitalmars-d-learn
On Thursday, 16 April 2015 at 12:17:24 UTC, Adil wrote: Calling Securities.bytes shows "188 MB", but "ps" shows about 591 MB of Resident memory. Where is the memory usage coming from? What am i missing? I'd say this is memory allocated while you load the CSV file. I can't tell much more witho

What is the memory usage of my app?

2015-04-16 Thread Adil via Digitalmars-d-learn
I've written a simple socket-server app that securities (stock market shares) data and allows clients to query over them. The app starts by loading instrument information from a CSV file into some structs, then listens on a socket responding to queries. It doesn't mutate the data or allocate anyth