Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0003353 [Quercus] minor always 02-23-09 14:13 02-26-09 08:11
Reporter koreth View Status public  
Assigned To nam
Priority normal Resolution fixed  
Status closed   Product Version 4.0.0
Summary 0003353: Large autoinitialized arrays fail to compile
Description We have a string table in a PHP array that has recently grown too large to compile. The code looks something like this:

function get_string_table() {
  return array(
    'abc' => array('Hi there', 'Initial message at startup'),
    'def' => array('No room', 'Error: not enough space'),
    'ghi' => array('No session', 'Shown when session can\'t be established'),

The PHP file, which is about 90% made up of array elements like the above, is about 164KB.

My workaround for now is to split this file into two functions and have the first one merge its array with the second one's, but that means the array has to be constructed on each hit, even though it's static data that is never modified at runtime.

It would be better if Quercus could automatically split this up into separate .java files; it could do the array assembly once at class initialization time and keep the finished array around for reuse on subsequent requests.

The biggest problem this is actually causing us is that this file fails to compile and causes Quercus to fall back to one-file-at-a-time compilation mode, so it takes ages to compile our PHP code base.
Additional Information
Attached Files

- Relationships

- Notes
02-26-09 08:11


Fixed for constant arrays. Regular arrays will take a little more work.

- Issue History
Date Modified Username Field Change
02-23-09 14:13 koreth New Issue
02-26-09 08:09 nam Status new => assigned
02-26-09 08:09 nam Assigned To  => nam
02-26-09 08:11 nam Status assigned => closed
02-26-09 08:11 nam Note Added: 0003845
02-26-09 08:11 nam Resolution open => fixed
02-26-09 08:11 nam Fixed in Version  => 4.0.0

Mantis 1.0.0rc3[^]
Copyright © 2000 - 2005 Mantis Group
29 total queries executed.
26 unique queries executed.
Powered by Mantis Bugtracker