Re: [Htmlparser-developer] Re: [Htmlparser-user] Another Ill-Formed Example
Brought to you by:
derrickoswald
From: Somik R. <so...@ya...> - 2002-08-08 07:14:19
|
MessageHi Claude, Thanks for the kind words. BTW: I was giving some thought to the calls that take place in = HTMLEnumeration. As far as I could tell, many internal calls were made = twice, by virtue of the hasMoreNodes/nextHTMLNode pattern. An alternate = pattern is repeated calls to nextHTMLNode which should stop when a null = response is returned. This pattern is used by the = BufferedReader.readLine method, by the JDBC ResultSet.next method, etc. = Based on the simple observation that calls to hasMoreNodes AND = nextHTMLNode run some of the same underlying code, it seems that the = speed of the parser could be positively influenced by reducing the = interface to a single call. Any thoughts? I am not so sure this would be a good idea, because then, we'd have to = compromise on the API. Then users would have to be checking for null = values- the iterator interface is also one that is popular and we have = a familiarity factor here. As far as optimization goes, the nextHTMLNode doesent do parsing, it = simply returns the node that was parsed internally when hasMoreNodes() = was called. So, the only speed up would be in the reduction of a call - = I am not so sure that this would be the best place for such a speedup. Bytway, talking about speedups, the last release and the next one should = see some tweaks - and the performance ought to have gotten better. Are = you still doing the performance testing ? Any results to share ? Cheers, Somik |