font-lock-maximum-size

font-lock-maximum-size is a variable defined in `font-lock.el'.
Its value is
256000

  • This variable is obsolete since 24.1.

Documentation:
Maximum buffer size for unsupported buffer fontification.
When `font-lock-support-mode' is nil, only buffers smaller than
this are fontified. This variable has no effect if a Font Lock
support mode (usually `jit-lock-mode') is enabled.

If nil, means size is irrelevant.
If a list, each element should be a cons pair of the form (MAJOR-MODE . SIZE),
where MAJOR-MODE is a symbol or t (meaning the default). For example:
((c-mode . 256000) (c++-mode . 256000) (rmail-mode . 1048576))
means that the maximum size is 250K for buffers in C or C++ modes, one megabyte
for buffers in Rmail mode, and size is irrelevant otherwise.

You can customize this variable.