0
votes
0answers
42 views

Reading a file line by line for large files efficiently in PHP? [migrated]

My app reads a large file 5MB - 10MB that has been entered in with json entries line by line. Each line is handled by a parser that is fed to multiple parsers and treated separately. Once the file is ...
0
votes
1answer
98 views

Is creating a separate pool for each individual png image in the same class appropriate?

I'm still possibly a little green about object-pooling, and I want to make sure something like this is a sound design pattern before really embarking upon it. Take the following code (which uses the ...
4
votes
2answers
540 views

How much logic can be put into an object-pooling factory class before it does more harm than good?

The main language I'm interested in doing object pooling in is AS3, which is known to need it in many cases. In the past I've always made a brand new factory class for every type I was going to try ...
3
votes
1answer
169 views

Processing every leaf under a node in a tree efficiently

Short version: In a tree (non-binary) with many levels of children, where each node can have multiple leaves, what is the best way to tally leaves that meet a certain condition given a node? Long, ...
1
vote
4answers
316 views

When should code favour optimization over readability and ease-of-use?

I am in the process of designing a small library, where one of my design goals is that the API should be as close to the domain language as possible. While working on the design, I've noticed that ...
8
votes
6answers
2k views

Are There Any Programming Focused Notebooks? [closed]

I know that engineering paper exists, but are there any companies that make programmer-specific notebooks for notes/pseudo-code/designs? Paper is my preferred way of outlining things, so the addition ...