About

I am a software developer in Seattle, building a new AI software company.

Ads

May 2012

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Ads


« Software Design Philosophy | Main | High Level Languages Performance »

September 07, 2006

Comments

RichB

I'm trying to grok your approach. Assuming I have a large object graph, are you saying that the graph is not connected by pointers? It is connected by IDs and then to traverse the graph the ID needs to be looked up in a dictionary?

That sounds extremely slow.

The reason I ask is that I have a system with ~30,000 nodes in a graph which is rendered on the screen. A couple of years ago, I remodeled the class hierarchy to be more like Avalon....

Wesner Moise

In a system with 30,000 nodes, you probably won't need any IDs.

Object identity is not actually important in referentially transparent world; it's usefulness is tied to side-effects.

Pinpointing of a node in a tree is done by passing around path information. This isn't as common either. It's main use in my application would be identifying the selected region of a document.

The only use for IDs that I can think of in a Word-like application is the cross-references feature, which is not an often used feature.

Indexing of IDs is an option. You only (de-)index the subforest of data in the document tree that has changed in the (old) new tree. You won't necessarily have to search down to the leaves--just the middle region where all the changes occured. You can do the indexing anytime, preferably after idle or, lazily, at some point when the ID is requested.

damien morton

I have been struggling with similar concepts, though I have been looking at data/delta rather than old/new data structures.

Have you read of Huet's Zipper?

http://www.st.cs.uni-sb.de/edu/seminare/2005/advanced-fp/docs/huet-zipper.pdf

Wesner Moise

Design patterns are signs of weakness in programming languages link in http://newbabe.pobox.com/~mjd/blog/prog/design-patterns.html.

This is not the original link that I was referring to in my post, but it's points are somewhat similar.

Wesner Moise

I haven't read the Zipper link, but I'll get back to you damien within a month.

Wesner Moise

As for the data/delta issue, I may indeed use that approach to conserve memory. The delta would be constructed by comparing the old and new data structure at idle, and later allow the new data to be reconstructed on demand while using less memory.

The comments to this entry are closed.