Bug 21432 - High memory requirement
Summary: High memory requirement
Status: NEW
Alias: None
Product: Class Libraries
Classification: Mono
Component: WCF assemblies (show other bugs)
Version: unspecified
Hardware: PC Mac OS
: Low normal
Target Milestone: Untriaged
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2014-07-18 07:36 UTC by Rolf Bjarne Kvinge [MSFT]
Modified: 2017-09-06 16:55 UTC (History)
3 users (show)

See Also:
Tags:
Is this bug a regression?: ---
Last known good build:


Attachments
WCFService.zip (36.10 KB, application/zip)
2014-07-18 07:36 UTC, Rolf Bjarne Kvinge [MSFT]
Details
wcf-client.zip (you'll have to modify the IP to point to where you're running the server) (30.04 KB, application/zip)
2014-07-18 07:37 UTC, Rolf Bjarne Kvinge [MSFT]
Details

Description Rolf Bjarne Kvinge [MSFT] 2014-07-18 07:36:02 UTC
Created attachment 7417 [details]
WCFService.zip

Fetching a 20mb byte array makes memory usage jump 150mb on the first request, and if subsequent requests are done the peak memory usage goes up to over 600mb.

This is a problem for mobile devices, where available memory is limited.

See attached test case.
Comment 1 Rolf Bjarne Kvinge [MSFT] 2014-07-18 07:37:08 UTC
Created attachment 7418 [details]
wcf-client.zip (you'll have to modify the IP to point to where you're running the server)
Comment 2 Rolf Bjarne Kvinge [MSFT] 2014-07-18 07:40:53 UTC
Sample test case output:

Initial: GC.GetTotalMemory: 4 MiB
WCF download success! #1: GC.GetTotalMemory: 154 MiB
WCF download success! #2: GC.GetTotalMemory: 327 MiB
WCF download success! #3: GC.GetTotalMemory: 460 MiB
WCF download success! #4: GC.GetTotalMemory: 461 MiB
WCF download success! #5: GC.GetTotalMemory: 467 MiB
WCF download success! #6: GC.GetTotalMemory: 448 MiB
WCF download success! #7: GC.GetTotalMemory: 460 MiB
WCF download success! #8: GC.GetTotalMemory: 460 MiB
WCF download success! #9: GC.GetTotalMemory: 449 MiB
WCF download success! #10: GC.GetTotalMemory: 479 MiB
WCF download success! #11: GC.GetTotalMemory: 449 MiB
WCF download success! #12: GC.GetTotalMemory: 527 MiB
WCF download success! #13: GC.GetTotalMemory: 502 MiB
WCF download success! #14: GC.GetTotalMemory: 524 MiB
WCF download success! #15: GC.GetTotalMemory: 520 MiB
WCF download success! #16: GC.GetTotalMemory: 605 MiB
Comment 3 Miguel de Icaza [MSFT] 2014-07-27 22:02:29 UTC
This is a known issue on the WCF stack, but rewriting this code is far from easy, since this happens in a recursive process, and without a major restructuring of the code (coupled really with a major test suite for the touch points), it is not possible to build a streaming version of this.

This is probably the major bit that keeps WCF as an alpha-level library at this point.

Note You need to log in before you can comment on or make changes to this bug.