Click here to Skip to main content
14,207,050 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life. Technical discussions are encouraged, but click here to ask your programming questions.

The Lounge is rated PG. If you're about to post something you wouldn't want your kid sister to read then don't post it. No flame wars, no abusive conduct, no programming questions and please don't post ads.
 
GeneralRe: Programmers that think they're smart Pin
Nelek9-Feb-19 4:06
protectorNelek9-Feb-19 4:06 
GeneralRe: Programmers that think they're smart Pin
CPallini9-Feb-19 4:18
mveCPallini9-Feb-19 4:18 
GeneralRe: Programmers that think they're smart Pin
Nelek9-Feb-19 4:27
protectorNelek9-Feb-19 4:27 
GeneralRe: Programmers that think they're smart Pin
sickfile11-Feb-19 2:36
membersickfile11-Feb-19 2:36 
GeneralRe: Programmers that think they're smart Pin
Mark H215-Feb-19 11:22
memberMark H215-Feb-19 11:22 
GeneralRe: Programmers that think they're smart Pin
Steve Naidamast11-Feb-19 5:58
professionalSteve Naidamast11-Feb-19 5:58 
GeneralRe: Programmers that think they're smart Pin
Nelek9-Feb-19 4:13
protectorNelek9-Feb-19 4:13 
GeneralRe: Programmers that think they're smart Pin
Matthew Dennis9-Feb-19 5:16
adminMatthew Dennis9-Feb-19 5:16 
when the proper way to do it is don't read the stream into a string, json.net can parse right from the stream with less allocations.
HttpClient client = new HttpClient();

using (Stream s = client.GetStreamAsync("http://www.test.com/large.json").Result)
using (StreamReader sr = new StreamReader(s))
using (JsonReader reader = new JsonTextReader(sr))
{
    JsonSerializer serializer = new JsonSerializer();
    // read the json from a stream
    // json size doesn't matter because only a small piece is read at a time from the HTTP request
    Person p = serializer.Deserialize<Person>(reader);
}

from Performance Tips
"Time flies like an arrow. Fruit flies like a banana."

GeneralRe: Programmers that think they're smart Pin
PIEBALDconsult9-Feb-19 5:53
protectorPIEBALDconsult9-Feb-19 5:53 
GeneralRe: Programmers that think they're smart Pin
Munchies_Matt9-Feb-19 5:18
memberMunchies_Matt9-Feb-19 5:18 
GeneralRe: Programmers that think they're smart Pin
GuyThiebaut9-Feb-19 5:22
professionalGuyThiebaut9-Feb-19 5:22 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan9-Feb-19 23:17
protectorRichard MacCutchan9-Feb-19 23:17 
GeneralRe: Programmers that think they're smart Pin
BryanFazekas11-Feb-19 1:46
memberBryanFazekas11-Feb-19 1:46 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan11-Feb-19 1:51
protectorRichard MacCutchan11-Feb-19 1:51 
GeneralRe: Programmers that think they're smart Pin
BryanFazekas11-Feb-19 2:04
memberBryanFazekas11-Feb-19 2:04 
GeneralRe: Programmers that think they're smart Pin
Richard MacCutchan11-Feb-19 2:43
protectorRichard MacCutchan11-Feb-19 2:43 
GeneralRe: Programmers that think they're smart Pin
#realJSOP9-Feb-19 5:47
mve#realJSOP9-Feb-19 5:47 
GeneralRe: Programmers that think they're smart Pin
OriginalGriff9-Feb-19 6:01
protectorOriginalGriff9-Feb-19 6:01 
GeneralRe: Programmers that think they're smart Pin
GuyThiebaut9-Feb-19 6:45
professionalGuyThiebaut9-Feb-19 6:45 
GeneralRe: Programmers that think they're smart Pin
#realJSOP9-Feb-19 9:59
mve#realJSOP9-Feb-19 9:59 
GeneralRe: Programmers that think they're smart Pin
Mike Hankey9-Feb-19 11:21
professionalMike Hankey9-Feb-19 11:21 
GeneralRe: Programmers that think they're smart Pin
Tachyonx9-Feb-19 9:33
memberTachyonx9-Feb-19 9:33 
GeneralRe: Programmers that think they're smart Pin
F-ES Sitecore9-Feb-19 10:48
mveF-ES Sitecore9-Feb-19 10:48 
GeneralRe: Programmers that think they're smart Pin
Member 916705710-Feb-19 21:05
memberMember 916705710-Feb-19 21:05 
GeneralRe: Programmers that think they're smart Pin
maze310-Feb-19 22:13
professionalmaze310-Feb-19 22:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190612.1 | Last Updated 15 Jun 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid