List of Phobos functions that allocate memory?

Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com> Ola Fosheim Grøstad" <ola.fosheim.grostad+dlang at gmail.com>
Fri Feb 7 09:10:14 PST 2014


On Friday, 7 February 2014 at 15:33:01 UTC, Adam D. Ruppe wrote:
> One problem with allocating the exception is the stop-the-world 
> thing.

Ok, well I guess that primarily is an issue for validation errors 
where you need to return detailed error reporting. "Not Found" 
etc can be preallocated as immutable, or?

> constructor, which is run once per request. It can answer 
> requests at a rate of about 6000/sec on my computer...

That sounds pretty good, was that as localhost, or over a network?

> (BTW, interestingly, on Linux it uses separate process pools 
> instead of threads. The GC does NOT stop the world since the 
> other processes can keep going. But, if the requests are fairly 
> uniform - as is typically the case with benchmarks - each 
> process hits the GC threshold at about the same time.... 
> ironically, it is the deterministic nature of the GC that leads 
> to the performance killer there.)

You could synchronize them by calling the GC explicitly N seconds 
after the other process GC or you if you use a load balancer, 
maybe the GC could be scheduled by the load balancer or notify 
the load balancer (assuming all requests are short-lived).

This won't work for a simulation type server though. (which is 
what I am most interested in)


More information about the Digitalmars-d mailing list