filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ]

Render Table Memory Issues

An easy fix to a problem with rendering huge websites

I recently spoke with a friend who has a huge website in Frontier. It is over 150 megabytes, with a large number of images. I have no idea how many pages it actually is.

Memory leak?

Anyway, this friend complained of a memory leak when rendering a table. He had actually asked Userland about this and been told it was not a memory leak. I didn't think it was a memory leak either--but whether it was a leak or not, he was still getting out of memory errors whenever he tried to render his whole site.

So, the issue was still unresolved.

What was goin' on

As Frontier renders a website, it loads objects into memory from disk. These objects stay in memory until the database gets saved, when they are flushed out (or if modified, written out to disk).

What was happening of course, is that Frontier loaded more and more of my friend's huge site into memory, it eventually ran out.

An easy fix

The fix for this is easy.

I put this fix into html.commands.releaseTable, although there may be a better place for it.

Looking inside the publishTable () routine for the doTable () routine. Inside the for i = 1 to ct loop, after the window.msg verb, I inserted a couple lines:

if memAvail () < 1024 * 1000 /\/ less than 1000k \{
  filemenu.save (); }

That did the trick.

Not a leak

Anyway, it wasn't a leak, but it was a problem. It was a dealstopper for him, which is just as bad as a memory leak.

I'd ask Userland to consider making a similar change somewhere in the rendering code. It'll prevent unnecessary complaints of memory leaks that aren't really there. This code should also be added to the batchexport.import script to avoid the same problem.

Thanks for listening.

Phil

Ideas & Issues
Site Outline

I&I Home
1998
  05
  Improving Javascript Support
  Featuring suites.jsl: A pageheader script for the <SCRIPT> tag.
  06
  Character Entities
  Make working with HTML character entities easy.
  Copy Address
  FileWriters Questions
  Ideas for discussion
  Navigating the ODB
  Making it easier to get around in Frontier
  Suite Info
  If you write suites, tell your users about yourself!
  07
  Binary Objects in Your Website
  Frontier needs to learn how to render binary objects
  Creating META tags
  How can I put <meta> tags into my Frontier web pages?
  Filemaker and Frontier
  Where can I find resources for scripting Filemaker with Frontier?
  Frontier Mailing Lists
  More signal, less noise
  08
  Comments on Fat Pages
  Good fatpage, bad fatpage
  Quiet Advances
  Userland continues to crank out new features, bug fixes.
  Render Table Memory Issues
  An easy fix to a problem with rendering huge websites
  12
  Rendering out to more than one server
  Filewriters should be able to see the adrPageTable

   
Back to I&I Home   >>  

Back to
the top

This is Phil's Frontier Scripting Site. San Francisco, CA
Copyright © 1996-98, Phil Suh. All Rights Reserved.
http://www.filsa.net/frontier/ii/1998/08/renderTableMemory.html
This page last built on 6/28/99; 11:08:21 PM

filsa.net: Frontier Scripting [ Script Archive | Ideas & Issues | Polyglot | Software | Projects ]