Just brainstorming here, a little. I think we should consider adding
post-markups hooks, which are processed after sending text to the
user, assuming BOLTabort is not called.

Currently, I believe BOLTsavepage writes to disk every time some file
is updated, which shame if your logging lots of messages to the same
page, or similar. We also have times where it may be good to wait or
override certain effects: one may want to disable forward or other
commands when displaying certain text.

If we where to add post-processing hooks, we could move all heavy
tasks that do not give user input to after the page is sent, combine
several tasks into one, and allow all markup to be processed before
reacting to certain markup.

Consider the following change to to BOLTsavepage:
BOLTcache[page] is updated directly when new content is saved.
instead of the "write to disk" code, we have
if( !in_array(page, $BOLTshutdownHooks['commit']) ) $BOLTshutdownHooks
['commit'][] = page

After the link to the user is closed, we have a function
BOLTprocessHooks() {
  foreach( $BOLTshutdownHooks as $function => $args ) {
    BOLT$function($args)
  }
}

and a BOLTcommit($pages) {
  foreach( $pages as $page ) // determine correct location and write
data in cache to disk.
}


Of course, with bolt redirect one may not always want this behaviour,
as it would mean the page has to load completly before loading another
page, but I'm sure one could find uses. Maybe I'm just missing TeX
functionality, but I think it's worth it just to keep to implement
delayed disk writes. Keeping disk writes to a minimum, and making sure
disk writes doesn't slow page loads, is a worthy goal. The browsers
time out after a while, after all.

...

Yes, it has actually happened to me.

Generally, i'm convinced that while boltwire is fast, It can always
get faster. I'm going to begin looking for optimisations every time
I'm poking in the engine...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"BoltWire" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/boltwire?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to