JP5464283B2 - Print data processing method - Google Patents

Print data processing method Download PDF

Info

Publication number
JP5464283B2
JP5464283B2 JP2013000791A JP2013000791A JP5464283B2 JP 5464283 B2 JP5464283 B2 JP 5464283B2 JP 2013000791 A JP2013000791 A JP 2013000791A JP 2013000791 A JP2013000791 A JP 2013000791A JP 5464283 B2 JP5464283 B2 JP 5464283B2
Authority
JP
Japan
Prior art keywords
image data
data generation
processing
threads
thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2013000791A
Other languages
Japanese (ja)
Other versions
JP2013080517A (en
Inventor
三好 笹倉
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Casio Computer Co Ltd
Original Assignee
Casio Computer Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Casio Computer Co Ltd filed Critical Casio Computer Co Ltd
Priority to JP2013000791A priority Critical patent/JP5464283B2/en
Publication of JP2013080517A publication Critical patent/JP2013080517A/en
Application granted granted Critical
Publication of JP5464283B2 publication Critical patent/JP5464283B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明はプリンタ装置等の印刷装置に接続されたホスト機器において、印刷装置に送信する印刷データの処理を行う印刷データ処理方法に関する。   The present invention relates to a print data processing method for processing print data to be transmitted to a printing apparatus in a host device connected to the printing apparatus such as a printer apparatus.

今日、プリンタ装置等の印刷装置はLAN(local area network)等のネットワークに接続されたホスト機器から印刷データの供給を受け、又はピアツーピア(peer to peer)のネットワーク環境で接続されたホスト機器から印刷データの供給を受け、印刷処理を行っている。この場合、ホスト機器である、例えばパーソナルコンピュータ(PC)にはプリンタドライバが搭載され、印刷データを印刷装置に対応する中間コマンドに変換し、印刷装置に送信している。   Today, a printing device such as a printer device receives print data from a host device connected to a network such as a LAN (local area network) or prints from a host device connected in a peer-to-peer network environment. Receives data and prints. In this case, a printer driver is mounted on a host device, for example, a personal computer (PC), and print data is converted into an intermediate command corresponding to the printing apparatus and transmitted to the printing apparatus.

図30は、パーソナルコンピュータ(PC)に搭載されたプリンタドライバを中心とした印刷システムの構成図である。プリンタドライバ30はPDL変換部31、画像データ形成部32、画像データ圧縮部33、スプール出力部34、PDLバッファ35、画像データメモリ36で構成されている。ワープロソフトや表計算ソフト等のアプリケーションプログラム(APL)によって作成された文書ファイルは、PDL変換部31に供給され、PDL変換部31によってPDLコマンドに変換され、PDLバッファ35に格納される。このPDLコマンドは、例えば線や円の作成、文字の作成等を指示するコマンドであり、印刷装置に対応したコマンドである。   FIG. 30 is a configuration diagram of a printing system centered on a printer driver mounted on a personal computer (PC). The printer driver 30 includes a PDL conversion unit 31, an image data forming unit 32, an image data compression unit 33, a spool output unit 34, a PDL buffer 35, and an image data memory 36. A document file created by an application program (APL) such as word processing software or spreadsheet software is supplied to the PDL conversion unit 31, converted into a PDL command by the PDL conversion unit 31, and stored in the PDL buffer 35. This PDL command is, for example, a command for instructing creation of lines and circles, creation of characters, and the like, and is a command corresponding to the printing apparatus.

画像データ形成部32は、PDLバッファ35に格納されたPDLコマンドを読み出し、例えばビットマップ形式の画像データに変換して、画像データメモリ36に記憶する。このようにして、画像データメモリ36に記憶された画像データは、画像データ圧縮部33において圧縮処理が施され、スプール出力部34からスプーラ38に出力され、スプーラ38からプリンタ装置(印刷装置)40に出力される。   The image data forming unit 32 reads the PDL command stored in the PDL buffer 35, converts it into, for example, bitmap format image data, and stores it in the image data memory 36. In this manner, the image data stored in the image data memory 36 is subjected to compression processing in the image data compression unit 33, output from the spool output unit 34 to the spooler 38, and from the spooler 38 to the printer device (printing device) 40. Is output.

一方、複数のプロッセッサを使用し、ページ単位に印刷データを処理する印刷制御方法として、特許文献1が提案されている。この発明は、複数頁にわたる印刷コマンドをバッファに格納し、複数のプロッセッサにより上記バッファから印刷コマンドを読み出し、頁毎にプロッセッサにより描画処理を行う印刷制御方法である。   On the other hand, Patent Document 1 has been proposed as a print control method that uses a plurality of processors and processes print data in units of pages. The present invention is a print control method in which a print command for a plurality of pages is stored in a buffer, the print command is read from the buffer by a plurality of processors, and drawing processing is performed by the processor for each page.

特開平05−201077号公報Japanese Patent Laid-Open No. 05-201077

上記特許文献1の発明は複数のプロセッサを使用するが、基本的には線や円を作成し、文字の生成等を行なうPDLデータを1頁分受け取りPDLデータを解析しながら一時蓄積する(空描画)。1頁分のPDLデータが揃ってから画像形成タスクを生成しプロセッサを割り当て、一時蓄積したPDLデータを再度解析・実行して画像形成を行なう(実描画)。それと並行して次の頁のPDLデータを受け取り解析しながら一時蓄積し、次の頁のPDLデータが揃うとまた新たに画像形成タスクを生成し同じように画像形成していく。印刷データを頁単位にプロセッサを割り当て、並列処理を行う制御方法である。したがって、プリンタエンジンが高速になればなるほど、多くのプロセッサを必要とし、非常に高価なものになってしまう。また、空描画の為に受け取ったPDLデータを一度解析する必要があり、効率も良くない。更にこの空描画の為に1つのタスクが必要でありプロセッサも1つ必要である。プロセッサが少ない場合、同時並行して画像形成できる頁数は非常に少ないものとなり、印刷処理の高速化には限界がある。   The invention of Patent Document 1 uses a plurality of processors. Basically, a line or a circle is created, and one page of PDL data for generating characters is received and temporarily accumulated while analyzing the PDL data (empty). drawing). After one page of PDL data is prepared, an image forming task is generated, a processor is assigned, and the temporarily stored PDL data is analyzed and executed again to form an image (actual drawing). At the same time, PDL data of the next page is received and temporarily stored while being analyzed. When the PDL data of the next page is ready, a new image forming task is generated and an image is similarly formed. This is a control method in which processors are assigned to print data in units of pages and parallel processing is performed. Therefore, the faster the printer engine, the more processors are required and the more expensive it becomes. Moreover, it is necessary to analyze the PDL data received for empty drawing once, which is not efficient. Furthermore, one task is required for this empty drawing, and one processor is also required. When the number of processors is small, the number of pages on which images can be simultaneously formed becomes very small, and there is a limit to speeding up the printing process.

そこで、本発明はできるかぎり少ない複数のCPU、又は1つのCPUの中に複数のコアを有するマルチコア(multiple core)CPUを使用し、頁単位ではなく、ストリーム型の印刷データ(PDLデータ)をシーケンシャル処理のまま、画像形成処理のマルチスレッド方式による並列処理を行い、印刷データを高速に処理する印刷データ処理方法を提供するものである。   Therefore, the present invention uses a plurality of CPUs as few as possible, or a multiple core CPU having a plurality of cores in one CPU, and sequentially outputs stream type print data (PDL data) instead of page units. The present invention provides a print data processing method that performs multi-threaded parallel processing of image forming processing as it is, and processes print data at high speed.

上記課題は第1の発明によれば、印刷装置に送信するための印刷データを処理する少なくとも1つ以上の処理手段を備えた印刷データ処理装置であって、
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮する画像データ生成手段と、
前記圧縮された画像データを前記印刷装置に送信する送信手段と、
前記PDLコマンドを記憶するコマンド記憶手段と、
前記画像データを記憶する画像データ記憶手段と、
前記画像データ生成手段を実現する画像データ生成スレッドを少なくとも1つ以上起動させるシステム制御手段と、
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測する計測手段と、
前記処理時間を元に算出される平均処理時間を前記画像データ生成スレッドの数ごとに記録する記憶手段と、
を含み、
前記システム制御手段は、前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理装置を提供することによって達成できる。
上記課題は第2の発明によれば、印刷装置に送信するための印刷データを処理する少なくとも1つ以上の処理手段を備えた印刷データ処理装置であって、
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮する画像データ生成手段と、
前記圧縮された画像データを前記印刷装置に送信する手段と、
前記PDLコマンドを記憶するコマンド記憶手段と、
前記画像データを記憶する画像データ記憶手段と、
前記画像データ生成手段を実現する画像データ生成スレッドを少なくとも1つ以上起動させるシステム制御手段と、
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測する計測手段と、
前記処理時間を元に算出される平均処理時間を用紙サイズごとかつ前記画像データ生成スレッドの数ごとに記録する記憶手段と、
を含み、
前記システム制御手段は、前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理装置を提供することによって達成できる。
好ましくは、請求項1または2に記載の印刷データ処理装置において、前記画像データ生成手段は、前記印刷データを前記PDLコマンドに変換する第1の画像データ生成手段と、前記PDLコマンドから前記画像データを生成する第2の画像データ生成手段と、前記画像データを圧縮し前記送信手段に出力する第3の画像データ生成手段と、を含み、前記画像データ生成スレッドは、2つ起動する場合には、前記第1の画像データ生成手段を実現する第1の画像データ生成スレッドと、前記第2の画像データ生成手段と前記第3の画像データ生成手段とを実現する第2の画像データ生成スレッドと、を含み、また、前記画像データ生成スレッドは、3つ起動する場合には、前記第1の画像データ生成手段を実現する第1の画像データ生成スレッドと、前記第2の画像データ生成手段を実現する第2の画像データ生成スレッドと、前記第3の画像データ生成手段を実現する第3の画像データ生成スレッドと、を含み、前記第1乃至第2、または、前記第1乃至第3の画像データ生成スレッドは、それぞれ互いに並列に動作可能な異なるスレッドである。
好ましくは、請求項3に記載の印刷データ処理装置において、前記コマンド記憶手段は、第1のコマンド記憶手段と、第2のコマンド記憶手段と、を含み、前記画像データ生成スレッドが複数起動する場合には、前記第1の画像データ生成スレッドが前記PDLコマンドを前記第1のコマンド記憶手段へ出力する期間、前記第2の画像データ生成スレッドは前記PDLコマンドを前記第2のコマンド記憶手段から取得し、前記第1の画像データ生成スレッドが前記PDLコマンドを前記第2のコマンド記憶手段へ出力する期間、前記第2の画像データ生成スレッドは前記PDLコマンドを前記第1のコマンド記憶手段から取得する。
好ましくは、請求項4に記載の印刷データ処理装置において、前記画像データ生成スレッドが複数起動する場合には、前記第1の画像データ生成スレッドは、前記第2の画像データ生成スレッドへ処理を要求するごとに、前記第1のコマンド記憶手段と前記第2のコマンド記憶手段を交互に切り替えて利用する。
好ましくは、請求項3乃至5に記載の印刷データ処理装置において、前記画像データ記憶手段は、第1の画像データ記憶手段と、第2の画像データ記憶手段と、を含み、前記画像データ生成スレッドが3つ起動する場合には、前記第2の画像データ生成スレッドが前記画像データを前記第1の画像データ記憶手段へ出力する期間、前記第3の画像データ生成スレッドは前記画像データを前記第2の画像データ記憶手段から取得し、前記第2の画像データ生成スレッドが前記画像データを前記第2の画像データ記憶手段へ出力する期間、前記第3の画像データ生成スレッドは前記画像データを前記第1の画像データ記憶手段から取得する。
好ましくは、請求項6に記載の印刷データ処理装置において、前記画像データ生成スレッドが3つ起動する場合には、前記第2の画像データ生成スレッドは、前記第3の画像データ生成スレッドへ処理を要求するごとに、前記第1の画像データ記憶手段と前記第2の画像データ記憶手段を交互に切り替えて利用する。
好ましくは、請求項1乃至請求項7のいずれか1つに記載の印刷データ処理装置において、前記画像データ生成スレッドの数は、前記ホスト機器が有する処理手段の数に応じて決定する。
好ましくは、請求項1乃至請求項7のいずれか1つに記載の印刷データ処理装置において、前記画像データ生成スレッドの数は、前記印刷データ処理装置が処理に利用するメモリの記憶容量に応じて決定する。
好ましくは、請求項1乃至請求項7のいずれか1つに記載の印刷データ処理装置において、前記画像データ生成スレッドの数は、前記画像データの解像度及び階調数に応じて決定する。
According to a first aspect of the present invention, there is provided a print data processing apparatus comprising at least one processing means for processing print data to be transmitted to a printing apparatus,
Image data generating means for converting the print data into a PDL command, generating image data from the converted PDL command, and further compressing the image data;
Transmitting means for transmitting the compressed image data to the printing apparatus;
Command storage means for storing the PDL command;
Image data storage means for storing the image data;
System control means for activating at least one image data generation thread for realizing the image data generation means;
Measuring means for measuring the processing time per page of each of the image data generation threads;
Storage means for recording an average processing time calculated based on the processing time for each number of the image data generation threads;
Including
The system control means can be achieved by providing a print data processing apparatus that determines the number of the image data generation threads to be the number that makes the average processing time the shortest .
According to a second aspect of the present invention, there is provided a print data processing apparatus comprising at least one processing means for processing print data to be transmitted to a printing apparatus,
Image data generating means for converting the print data into a PDL command, generating image data from the converted PDL command, and further compressing the image data;
Means for transmitting the compressed image data to the printing device;
Command storage means for storing the PDL command;
Image data storage means for storing the image data;
System control means for activating at least one image data generation thread for realizing the image data generation means;
Measuring means for measuring the processing time per page of each of the image data generation threads;
Storage means for recording an average processing time calculated based on the processing time for each sheet size and for each number of image data generation threads;
Including
The system control means can be achieved by providing a print data processing apparatus that determines the number of the image data generation threads to be the number that makes the average processing time the shortest.
Preferably, in the print data processing apparatus according to claim 1, the image data generation unit includes a first image data generation unit that converts the print data into the PDL command, and the image data from the PDL command. A second image data generating means for generating the image data, and a third image data generating means for compressing the image data and outputting the compressed image data to the transmitting means. A first image data generation thread that realizes the first image data generation means; a second image data generation thread that realizes the second image data generation means and the third image data generation means; When three image data generation threads are activated, a first image data generation thread that implements the first image data generation means is provided. A first image data generation thread that realizes the second image data generation means, and a third image data generation thread that realizes the third image data generation means. The second or second or first to third image data generation threads are different threads that can operate in parallel with each other.
Preferably, in the print data processing apparatus according to claim 3, the command storage unit includes a first command storage unit and a second command storage unit, and a plurality of the image data generation threads are activated. In the period during which the first image data generation thread outputs the PDL command to the first command storage means, the second image data generation thread acquires the PDL command from the second command storage means. During the period when the first image data generation thread outputs the PDL command to the second command storage means, the second image data generation thread acquires the PDL command from the first command storage means. .
Preferably, in the print data processing apparatus according to claim 4, when a plurality of the image data generation threads are activated, the first image data generation thread requests processing from the second image data generation thread. Each time, the first command storage means and the second command storage means are alternately switched and used.
Preferably, in the print data processing apparatus according to any one of claims 3 to 5, the image data storage means includes a first image data storage means and a second image data storage means, and the image data generation thread. , When the second image data generation thread outputs the image data to the first image data storage means, the third image data generation thread outputs the image data to the first image data storage means. The second image data generation thread obtains the image data from the second image data storage means, and the second image data generation thread outputs the image data to the second image data storage means. Obtained from the first image data storage means.
Preferably, in the print data processing apparatus according to claim 6, when the three image data generation threads are activated, the second image data generation thread performs processing to the third image data generation thread. Whenever requested, the first image data storage means and the second image data storage means are alternately switched and used.
Preferably, in the print data processing apparatus according to any one of claims 1 to 7, the number of the image data generation threads is determined according to the number of processing units included in the host device.
Preferably, in the print data processing device according to any one of claims 1 to 7, the number of the image data generation threads depends on a storage capacity of a memory used for processing by the print data processing device. decide.
Preferably, in the print data processing apparatus according to any one of claims 1 to 7, the number of the image data generation threads is determined according to the resolution and the number of gradations of the image data.

上記課題は第3の発明によれば、少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを処理する方法であって、According to a third aspect of the present invention, there is provided a method for processing print data to be transmitted to a printing apparatus on a host device including a processing unit having at least one core.
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮し、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信し、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶し、Storing the PDL command;
前記画像データを記憶し、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測し、Measure the processing time per page of each of the image data generation threads,
前記処理時間を元に算出される平均処理時間を前記画像データ生成スレッドの数ごとに記録し、An average processing time calculated based on the processing time is recorded for each number of the image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理方法を提供することによって達成できる。This can be achieved by providing a print data processing method characterized in that the number of the image data generation threads is determined to be a number that minimizes the average processing time.
上記課題は第4の発明によれば、少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを処理する方法であって、According to a fourth aspect of the present invention, there is provided a method for processing print data to be transmitted to a printing apparatus on a host device provided with processing means having at least one core.
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮し、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信し、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶し、Storing the PDL command;
前記画像データを記憶し、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測し、Measure the processing time per page of each of the image data generation threads,
前記処理時間を元に算出される平均処理時間を用紙サイズごとかつ前記画像データ生成スレッドの数ごとに記録し、The average processing time calculated based on the processing time is recorded for each paper size and for each number of the image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理方法を提供することによって達成できる。This can be achieved by providing a print data processing method characterized in that the number of the image data generation threads is determined to be a number that minimizes the average processing time.

上記課題は第5の発明によれば、少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを前記処理手段に処理させるプログラムであって、According to a fifth aspect of the present invention, there is provided a program for causing the processing means to process print data to be transmitted to a printing apparatus on a host device having processing means having at least one core.
前記処理手段に、In the processing means,
前記印刷データをPDLコマンドに変換させ、変換された前記PDLコマンドから画像データを生成させ、更に前記画像データを圧縮させ、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信させ、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶させ、Storing the PDL command;
前記画像データを記憶させ、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測させ、The processing time per page of each of the image data generation threads is measured,
前記処理時間を元に算出される平均処理時間を前記画像データ生成スレッドの数ごとに記録させ、The average processing time calculated based on the processing time is recorded for each number of the image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定させることを特徴とするプログラムを提供することによって達成できる。This can be achieved by providing a program characterized in that the number of the image data generation threads is determined such that the average processing time is the shortest.
上記課題は第6の発明によれば、少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを前記処理手段に処理させるプログラムであって、According to a sixth aspect of the present invention, there is provided a program for causing a processing unit to process print data to be transmitted to a printing apparatus on a host device having a processing unit having at least one core.
前記処理手段に、In the processing means,
前記印刷データをPDLコマンドに変換させ、変換された前記PDLコマンドから画像データを生成させ、更に前記画像データを圧縮させ、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信させ、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶させ、Storing the PDL command;
前記画像データを記憶させ、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測させ、The processing time per page of each of the image data generation threads is measured,
前記処理時間を元に算出される平均処理時間を用紙サイズごとかつ前記画像データ生成スレッドの数ごとに記録させ、The average processing time calculated based on the processing time is recorded for each paper size and for each number of image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定させることを特徴とするプログラムを提供することによって達成できる。This can be achieved by providing a program characterized in that the number of the image data generation threads is determined such that the average processing time is the shortest.

本発明によれば、複数のCPU又はCPUコアを使用し、かつ複数のPDLバッファ、及び画像データメモリを使用して印刷データの処理をマルチスレッド方式によって実行するので、印刷データの処理を高速に行うことができ、かつ、少ないCPUの数またはCPUコア数で実現できる。また、使用するスレッドの数をCPU又はコアの数、又はメモリ容量、又は解像度/階調数、又は実際のスレッド数に対応する処理時間を計測して設定することによって、自動的に各条件に対応した最適、かつ高速な印刷データの処理を行うことができる。   According to the present invention, since a plurality of CPUs or CPU cores are used, and a plurality of PDL buffers and an image data memory are used to execute print data processing by a multi-thread method, print data processing can be performed at high speed. And can be realized with a small number of CPUs or CPU cores. In addition, by measuring and setting the number of threads to be used, the number of CPUs or cores, or the memory capacity, the resolution / gradation number, or the actual number of threads, it is automatically set to each condition. Corresponding optimum and high-speed print data processing can be performed.

プリンタドライバの構成を具体的に説明する図である。FIG. 3 is a diagram specifically illustrating a configuration of a printer driver. 本実施形態に使用する印刷データ処理装置(プリンタドライバ)を有するクライアントPCの構成を示す図である。2 is a diagram illustrating a configuration of a client PC having a print data processing apparatus (printer driver) used in the present embodiment. FIG. プリンタドライバ内をコアに代えて、CPUで構成した構成例を説明する図である。FIG. 3 is a diagram illustrating a configuration example in which a printer driver is configured by a CPU instead of a core. プリンタドライバの初期設定処理を説明するフローチャートである。6 is a flowchart for explaining initial setting processing of a printer driver. プリンタドライバの初期設定処理を説明するフローチャートである。6 is a flowchart for explaining initial setting processing of a printer driver. プリンタドライバの初期設定処理を説明するフローチャートである。6 is a flowchart for explaining initial setting processing of a printer driver. PDL変換部(スレッド1)の処理を説明するフローチャートである。It is a flowchart explaining the process of a PDL conversion part (thread 1). 画像データ形成部(スレッド2)の処理を説明するフローチャートである。It is a flowchart explaining the process of an image data formation part (thread 2). 画像データ圧縮部及びスプール出力部(スレッド3)の処理を説明するフローチャートである。It is a flowchart explaining the process of an image data compression part and a spool output part (thread 3). (a)は、本実施形態の印刷データ処理を説明する模式図である。(b)は、従来の印刷データ処理を説明する模式図である。FIG. 4A is a schematic diagram illustrating print data processing according to the present embodiment. (B) is a schematic diagram illustrating conventional print data processing. 4個使用のコアに代えて、2個使用のコアを使用した場合のシステム構成例を示す図である。It is a figure which shows the system configuration example at the time of using a core of 2 use instead of a core of 4 use. 実施形態2の処理を説明するフローチャートである。10 is a flowchart illustrating processing according to the second embodiment. 実施形態3の処理を説明するフローチャートである。10 is a flowchart illustrating processing according to the third embodiment. 実施形態4の処理を説明するフローチャートである。10 is a flowchart illustrating processing of the fourth embodiment. 実施形態4の処理を説明するフローチャートである。10 is a flowchart illustrating processing of the fourth embodiment. 実施形態5で使用するクライアントPCのシステム構成図である。FIG. 10 is a system configuration diagram of a client PC used in the fifth embodiment. 処理時間記憶手段の構成を示す図である。It is a figure which shows the structure of a processing time memory | storage means. 実施形態5のスレッド1の処理を説明するフローチャートである。14 is a flowchart for explaining processing of a thread 1 according to the fifth embodiment. 計測開始処理を説明するフローチャートである。It is a flowchart explaining a measurement start process. 計測終了処理を説明するフローチャートである。It is a flowchart explaining a measurement end process. 実施形態5のスレッド2の処理を説明するフローチャートである。14 is a flowchart for explaining processing of a thread 2 according to the fifth embodiment. 計測開始処理を説明するフローチャートである。It is a flowchart explaining a measurement start process. 計測終了処理を説明するフローチャートである。It is a flowchart explaining a measurement end process. 実施形態5のスレッド3の処理を説明するフローチャートである。14 is a flowchart for explaining processing of a thread 3 according to the fifth embodiment. 計測開始処理を説明するフローチャートである。It is a flowchart explaining a measurement start process. 計測終了処理を説明するフローチャートである。It is a flowchart explaining a measurement end process. 処理時間の更新処理を説明するフローチャートである。It is a flowchart explaining the update process of processing time. スレッド2構成の処理時間の更新処理を説明するフローチャートである。It is a flowchart explaining the update process of the processing time of the thread 2 configuration. 実施形態5の変形例を説明する図である。FIG. 10 is a diagram for explaining a modification of the fifth embodiment. 従来の印刷処理を説明するフローチャートである。It is a flowchart explaining the conventional printing process.

以下、本発明の実施の形態を図面を参照しながら説明する。
(実施形態1)
Embodiments of the present invention will be described below with reference to the drawings.
(Embodiment 1)

図2は、本実施形態に使用する印刷データ処理装置(プリンタドライバ)を有するホスト機器としてのクライアントPCの構成を示す図である。印刷データ処理装置としてのプリンタドライバは、クライアントPCにLANなどを介して接続される印刷装置に、クライアントPCが印刷処理動作を行わせるためのプログラムで、通常、利用される印刷装置に対応して、その印刷装置のメーカが予め用意するものである。
クライアントPCにより利用する印刷装置が選択された後、その印刷装置に対応するプリンタドライバが、記憶媒体やWeb回線などを利用して、クライアントPCにインストールされた後、クライアントPC内のCPUにより処理が実行され印刷データ処理装置としての機能を発揮する。
図2において、クライアントPCはクワッドコアCPU7(以下、単にCPU7で示す)、RAM8、ROM2、ディスク装置3、LAN回路4、LCD(液晶ディスプレイ)5、及びキーボード(KB)6等で構成されている。また、印刷データ処理装置であるプリンタドライバ1は、クワッドコアCPU7上で動作し、CPU7は内部に4個のコア7a〜7dを有する。コア7a〜7dは、それぞれ独自にPDLコマンドの生成や、描画データの生成処理を行うことができ、後述するスレッドを実行する処理手段である。尚、RAM8は上記コア7a〜7dによる印刷データ処理の際、ワークエリアとしても使用される。
FIG. 2 is a diagram showing a configuration of a client PC as a host device having a print data processing apparatus (printer driver) used in the present embodiment. A printer driver as a print data processing apparatus is a program that allows a client PC to perform a print processing operation on a printing apparatus connected to the client PC via a LAN or the like. The printer manufacturer prepares in advance.
After a printing device to be used by the client PC is selected, a printer driver corresponding to the printing device is installed in the client PC using a storage medium or a Web line, and then processed by the CPU in the client PC. It is executed and functions as a print data processing apparatus.
In FIG. 2, the client PC includes a quad-core CPU 7 (hereinafter simply referred to as CPU 7), a RAM 8, a ROM 2, a disk device 3, a LAN circuit 4, an LCD (liquid crystal display) 5, a keyboard (KB) 6, and the like. . The printer driver 1 serving as a print data processing apparatus operates on a quad core CPU 7, and the CPU 7 includes four cores 7a to 7d therein. Each of the cores 7a to 7d is a processing unit that can independently generate a PDL command and generate drawing data and execute a thread described later. The RAM 8 is also used as a work area during print data processing by the cores 7a to 7d.

ROM2はクライアントPCのシステム制御プログラムや、後述する印刷データの処理プログラムを記憶する。尚、ディスク装置3に上記プログラムや必要なデータを記憶する構成としてもよい。また、LCD(液晶ディスプレイ)5には、CPU7(コア7a〜7d)の制御に従って必要な画面が表示され、キーボード(KB)6からユーザ操作に基づくキーボード操作信号が入力する。また、LAN回路4はクライアントPCによって作成された画像データをプリンタ装置10に出力する。   The ROM 2 stores a system control program for the client PC and a print data processing program to be described later. The disk device 3 may be configured to store the program and necessary data. A necessary screen is displayed on the LCD (liquid crystal display) 5 under the control of the CPU 7 (cores 7a to 7d), and a keyboard operation signal based on a user operation is input from the keyboard (KB) 6. The LAN circuit 4 outputs image data created by the client PC to the printer device 10.

尚、図3は印刷データ処理装置を含むクライアントPC内を、コア7a〜7dに代えて、複数のCPU(処理手段)で構成した例であり、他の回路構成は前述の図2と同様である。
図1は、本例のプリンタドライバ(印刷データ処理装置)の機能的構成を具体的に説明する図である。プリンタドライバ1はPDL変換部11(スレッド1)、画像データ生成部(レンダリング部、スレッド2)12、画像データ圧縮部13及びスプール出力部14(スレッド3)、PDLバッファ15、画像データメモリ16で構成されている。
FIG. 3 shows an example in which the client PC including the print data processing apparatus is configured by a plurality of CPUs (processing means) instead of the cores 7a to 7d, and other circuit configurations are the same as those in FIG. is there.
FIG. 1 is a diagram for specifically explaining the functional configuration of the printer driver (print data processing apparatus) of this example. The printer driver 1 includes a PDL conversion unit 11 (thread 1), an image data generation unit (rendering unit, thread 2) 12, an image data compression unit 13 and a spool output unit 14 (thread 3), a PDL buffer 15, and an image data memory 16. It is configured.

PDL変換部11は印刷データに含まれる線や円の作成、文字の作成等を指示するコマンドを本例で使用するプリンタ装置10に対応するコマンドに変換する機能を有し、アプリケーション(APL)によって作成された文書ファイルをPDLコマンドに変換する。
また、PDLバッファ15は、PDL変換部11によって変換されたPDLコマンドを格納するダブルバッファであり、PDLバッファ15a、15bで構成される。
The PDL conversion unit 11 has a function of converting commands instructing creation of lines and circles included in the print data, creation of characters, and the like into commands corresponding to the printer device 10 used in this example. The created document file is converted into a PDL command.
The PDL buffer 15 is a double buffer that stores the PDL command converted by the PDL conversion unit 11, and includes PDL buffers 15a and 15b.

画像データ生成部(レンダリング部)12は、PDLバッファ15a、15bに格納されたコマンドを交互に読み出し、画像データを生成し、当該画像データを画像データメモリ16に記憶する。画像データメモリ16もダブルバッファ方式の2つの画像データメモリ16a、16bで構成され、それぞれ1頁分の画像データの記憶が可能である。   The image data generation unit (rendering unit) 12 alternately reads commands stored in the PDL buffers 15 a and 15 b, generates image data, and stores the image data in the image data memory 16. The image data memory 16 is also composed of two image data memories 16a and 16b of a double buffer system, and each can store image data for one page.

画像データ圧縮部13は上記画像データメモリ16a、16bに記憶された画像データを交互に読み出し、公知の圧縮技術を使用してスプール出力部14に出力する。スプール出力部14は圧縮された画像データをスプーラ17に出力し、スプーラ17から圧縮された画像データをプリンタ装置10に供給する。プリンタ装置10では、画像データに伸張処理を施し、記録媒体に対して印刷処理を行う。   The image data compression unit 13 alternately reads the image data stored in the image data memories 16a and 16b and outputs the image data to the spool output unit 14 using a known compression technique. The spool output unit 14 outputs the compressed image data to the spooler 17, and supplies the compressed image data from the spooler 17 to the printer device 10. The printer apparatus 10 performs an expansion process on the image data and performs a print process on the recording medium.

ここで、図1に示すスレッド1〜3は、前述の図2に示すコア7a〜7dの何れかが担当する処理を示すものであり、例えばコア7aがアプリケーションプログラムによる文書ファイルの作成を行い、コア7bがスレッド1の処理を担当し、コア7cがスレッド2の処理を担当し、コア7dが画像データ圧縮部13による画像データの圧縮処理、及びスプール出力部14による画像データの出力処理を担当する。但し、アプリケーション処理、及び上記スレッド1〜3の処理を実行するコアは上記コアに限定されるのではなく、各処理が必要な際、空いているコア7a〜7dが使用される。   Here, the threads 1 to 3 shown in FIG. 1 indicate processing that any one of the cores 7a to 7d shown in FIG. 2 is in charge. For example, the core 7a creates a document file by an application program. The core 7b is in charge of processing of the thread 1, the core 7c is in charge of processing of the thread 2, and the core 7d is in charge of image data compression processing by the image data compression unit 13 and image data output processing by the spool output unit 14. To do. However, the core for executing the application processing and the processing of the threads 1 to 3 is not limited to the core, and free cores 7a to 7d are used when each processing is necessary.

以上の構成において、以下に本例の処理動作を説明する。   In the above configuration, the processing operation of this example will be described below.

図4〜図6はプリンタドライバ(印刷データ処理装置)1の初期設定処理を説明するフローチャートである。先ず、図4に示すフローチャートに従って、本例のマルチスレッドの初期化処理を行い(ステップ(以下、Sで示す)1)、更にマルチスレッド以外のプリンタドライバ1内の初期化処理を行う(S2)。   4 to 6 are flowcharts for explaining the initial setting process of the printer driver (print data processing apparatus) 1. First, in accordance with the flowchart shown in FIG. 4, multithread initialization processing of this example is performed (step (hereinafter referred to as S) 1), and further initialization processing in the printer driver 1 other than multithreading is performed (S2). .

図5に示すフローチャートは上記マルチスレッドの初期化処理を具体的に説明するフローチャートである。先ず、スレッド数を決定する(S3)。このスレッド数の決定は、例えば図6のフローチャートに示すように、スレッド数“3”に設定する(S4)。
次に、PDLバッファ15の領域、及び画像データメモリ16の領域を確保する(S5)。具体的には前述の図2に示すRAM8に、PDLバッファ15aの記憶領域を確保し、更に画像データメモリ16aの記憶領域を確保する。
The flowchart shown in FIG. 5 is a flowchart specifically explaining the multithread initialization process. First, the number of threads is determined (S3). The number of threads is determined by setting the number of threads to “3” as shown in the flowchart of FIG. 6 (S4).
Next, an area of the PDL buffer 15 and an area of the image data memory 16 are secured (S5). Specifically, the storage area of the PDL buffer 15a is secured in the RAM 8 shown in FIG. 2, and the storage area of the image data memory 16a is further secured.

次に、PDL変換部11によりPDLコマンド生成中において選択するバッファをPDLバッファ15aとし、画像データ形成部(レンダリング部)12により描画データ生成中において選択するバッファも同じPDLバッファ15aに初期設定する(S6)。さらに、画像データ形成部(レンダリング部)12が描画データ生成中において選択する画像データメモリを画像データメモリ16aとし、画像データ圧縮部13が描画データの圧縮中において選択する画像データメモリも同じ画像データメモリ16aに初期設定する(S6)。   Next, the PDL buffer 15a is selected as the buffer selected during PDL command generation by the PDL conversion unit 11, and the buffer selected during drawing data generation by the image data forming unit (rendering unit) 12 is also initialized to the same PDL buffer 15a ( S6). Further, the image data memory selected by the image data forming unit (rendering unit) 12 during the generation of the drawing data is the image data memory 16a, and the image data memory selected by the image data compression unit 13 during the compression of the drawing data is the same image data. Initial setting is made in the memory 16a (S6).

次に、画像形成要求中フラグをオフに設定し、圧縮・スプール出力要求中フラグもオフに設定する(S7)。すなわち、画像データ形成部(レンダリング部)12、及び画像データ圧縮部13、スプール出力部14が動作を行っていない状態を示すフラグをオフ状態に設定する。   Next, the image formation request flag is set to OFF, and the compression / spool output request flag is also set to OFF (S7). That is, a flag indicating a state in which the image data forming unit (rendering unit) 12, the image data compression unit 13, and the spool output unit 14 are not operating is set to an off state.

次に、設定されたスレッド数が“1”を越えているか判断する(S8)。この場合、前述のように、スレッド数が“3”に設定されており、判断(S8)はYES(イエス)であり、更にPDLバッファ15の記憶領域としてPDLバッファ15bを確保し(S9)、スレッド2を生成し、起動する(S10)。尚、前述の処理(S4)において、スレッド数を“1”に設定していれば(S8がNO(ノー))、直ちに次の判断に移行する。   Next, it is determined whether the set number of threads exceeds “1” (S8). In this case, as described above, the number of threads is set to “3”, the determination (S8) is YES (yes), and the PDL buffer 15b is secured as a storage area of the PDL buffer 15 (S9). A thread 2 is generated and activated (S10). If the number of threads is set to “1” in the above process (S4) (S8 is NO), the process immediately proceeds to the next determination.

次に、判断(S11)は、スレッド数が“2”を越えているか判断する。この判断も、前述のように本例において、スレッド数“3”が設定されており、判断(S11)はYES(イエス)であり、更に画像データメモリ16の領域として画像データメモリ16bを確保し(S12)、スレッド3を生成し、起動する(S13)。尚、スレッド数が“2”の場合には、上記画像データメモリ16bのエリアは確保されず(S11がNO)、スレッド数が“1”の場合には、上記PDLバッファ15b及び画像データメモリ16bのエリアは確保されない(S8がNO、S11もNO)。   Next, in the determination (S11), it is determined whether the number of threads exceeds “2”. In this example, the number of threads is set to “3” in this example as described above, the determination (S11) is YES, and the image data memory 16b is secured as an area of the image data memory 16. (S12) The thread 3 is generated and activated (S13). If the number of threads is “2”, the area of the image data memory 16b is not secured (NO in S11). If the number of threads is “1”, the PDL buffer 15b and the image data memory 16b Are not secured (NO in S8, NO in S11).

以上のようにして初期設定処理が完了した後、アプリケーションプログラムによって作成された印刷データがプリンタドライバ1に供給される。図7〜図9は以後の処理を説明するフローチャートであり、スレッド1、2、及び3が行う処理を説明するものである。   After the initial setting process is completed as described above, the print data created by the application program is supplied to the printer driver 1. FIG. 7 to FIG. 9 are flowcharts for explaining the subsequent processing, and explain the processing performed by the threads 1, 2, and 3.

尚、図10(a)は本例の処理を模式的に示す図である。   FIG. 10A is a diagram schematically showing the processing of this example.

先ず、図7に示すフローチャートはPDL変換部11によるスレッド1の処理を説明するものであり、供給される文書ファイルに従ってアプリケーションプログラムより依頼された要求を取り出す。例えば、線や円の生成や文字の作成要求に従って、対応するPDLコマンドを生成する(ステップ(以下、STで示す)1、2)。   First, the flowchart shown in FIG. 7 explains the processing of the thread 1 by the PDL conversion unit 11, and takes out the request requested by the application program in accordance with the supplied document file. For example, a corresponding PDL command is generated according to a line or circle generation request or a character generation request (steps (hereinafter referred to as ST) 1 and 2).

次に、生成したPDLコマンドを前述のPDLバッファ15aにバッファリングする(ST3)。図10(a)に示すaはこの処理を示し、文書ファイルの1頁目の最初の印刷データのPDLコマンドがPDLバッファ15aに格納される。また、上記処理は、例えばコア7aによって実行される。   Next, the generated PDL command is buffered in the aforementioned PDL buffer 15a (ST3). “A” shown in FIG. 10A indicates this processing, and the PDL command of the first print data of the first page of the document file is stored in the PDL buffer 15a. Moreover, the said process is performed by the core 7a, for example.

次に、PDL変換部11は生成したPDLコマンドが改頁コマンドであるか判断する(ST4)。通常、最初のこの処理はNO(ノー)であり、PDLバッファ15aの容量一杯までPDLコマンドがバッファリングされたか判断する(ST5)。ここで、PDLバッファ15aに余裕があれば、上記処理(ST1)に戻ってアプリケーションプログラムより依頼された要求に従ったPDLコマンドの生成、及びPDLバッファ15aへの格納処理を繰り返す(ST1〜ST5)。   Next, the PDL conversion unit 11 determines whether the generated PDL command is a page break command (ST4). Normally, this first process is NO, and it is determined whether the PDL command has been buffered to the full capacity of the PDL buffer 15a (ST5). Here, if there is room in the PDL buffer 15a, the process returns to the above process (ST1) to repeat the generation of the PDL command according to the request requested by the application program and the storing process in the PDL buffer 15a (ST1 to ST5). .

その後、PDLバッファ15aの容量一杯までPDLコマンドがバッファリングされた場合(ST5がYES)、又は改頁コマンドが検出されると(ST4がYES)、スレッド数の設定が“1”を越えているか判断する(ST6)。ここで、本例では前述のように、スレッド数が“3”に設定されており(ST6がYES)、更に画像形成要求中フラグがオンであるか判断する(ST7)。この画像形成要求中フラグは、前述の初期設定処理(S7)によってオフに設定されており(ST7がNO)、上記PDLコマンドを格納したPDLバッファ15aを、以後画像データ形成部(レンダリング部)12が読み出しを行うPDLバッファに設定する(ST8)。   After that, when the PDL command is buffered to the full capacity of the PDL buffer 15a (ST5 is YES), or when a page break command is detected (ST4 is YES), whether the number of threads setting exceeds “1”. Judgment is made (ST6). In this example, as described above, the number of threads is set to “3” (YES in ST6), and it is further determined whether the image formation request flag is on (ST7). This image formation request flag is set to OFF by the above-described initial setting process (S7) (NO in ST7), and the PDL buffer 15a storing the PDL command is subsequently sent to the image data forming unit (rendering unit) 12 Is set in the PDL buffer to be read (ST8).

次に、画像形成要求中フラグをオンにセットし(ST9)、スレッド2に対して画像形成要求を出す(ST10)。すなわち、PDL変換部11から画像データ形成部(レンダリング部)12に対して画像形成要求を出力する。   Next, an image formation request flag is set on (ST9), and an image formation request is issued to the thread 2 (ST10). That is, the PDL conversion unit 11 outputs an image formation request to the image data forming unit (rendering unit) 12.

その後、PDL変換部11は次に文書ファイルから生成するPDLコマンドを格納するPDLバッファ15a又は15bを設定する。この場合、現在選択されているPDLバッファが15aであれば(ST11がYES)、PDLバッファ15bに変更し(ST12)、現在選択されているPDLバッファが15bであれば(ST11がNO)、PDLバッファ15aに変更する(ST13)。   Thereafter, the PDL conversion unit 11 sets the PDL buffer 15a or 15b for storing the PDL command generated from the document file. In this case, if the currently selected PDL buffer is 15a (ST11 is YES), it is changed to the PDL buffer 15b (ST12), and if the currently selected PDL buffer is 15b (ST11 is NO), PDL Change to buffer 15a (ST13).

尚、前述の判断(ST7)において、画像形成要求中フラグがオンの場合には、画像データ形成部(レンダリング部)12による画像形成処理の終了を待ち、画像形成要求中フラグをオフする(ST7がYES、ST14、ST15)。この処理は、後に画像データ形成部(レンダリング部)12が処理を終了した際行う処理であり、後述する。   If the image formation request flag is on in the above-described determination (ST7), the image data formation section (rendering section) 12 waits for the image formation process to end and turns off the image formation request flag (ST7). YES, ST14, ST15). This process is performed when the image data forming unit (rendering unit) 12 finishes the process later, and will be described later.

また、前述の改頁コマンドが供給される前に、多くの場合PDLバッファ15aがPDLコマンドで満杯になり、次に選択されたPDLバッファ15bに以後の文書ファイルのPDLコマンドがバッファリングされる(例えば、図10(a)のe1〜enの処理)。   In many cases, before the above-mentioned page break command is supplied, the PDL buffer 15a is filled with the PDL command, and the PDL command of the subsequent document file is buffered in the next selected PDL buffer 15b ( For example, the process from e1 to en in FIG.

次に、スレッド2の処理、即ち画像データ形成部(レンダリング部)12の処理は、図8に示すフローチャートに従って実行され、先ずPDL変換部11からの画像形成要求の発生を待つ(ST16)。そして、画像データ形成部(レンダリング部)12に画像形成要求が入力すると、PDLバッファ15aに格納されたPDLコマンドを順次取り出し、取り出したPDLコマンドが改頁コマンドであるか判断する(ST17、ST18)。   Next, the processing of the thread 2, that is, the processing of the image data forming unit (rendering unit) 12, is executed according to the flowchart shown in FIG. 8, and first waits for the generation of an image forming request from the PDL converting unit 11 (ST16). When an image formation request is input to the image data forming unit (rendering unit) 12, the PDL commands stored in the PDL buffer 15a are sequentially extracted, and it is determined whether the extracted PDL command is a page break command (ST17, ST18). .

通常、最初のこの処理はノーであり、PDLバッファ15aから取り出したPDLコマンドの解析を行い、そのPDLコマンドに対応した画像形成処理を行ない、描画データとして画像データメモリ16aに展開する(ST19)。尚、この処理は図10(a)に示すbである。   Normally, the first process is NO, the PDL command extracted from the PDL buffer 15a is analyzed, an image forming process corresponding to the PDL command is performed, and the image data is expanded in the image data memory 16a (ST19). This process is b shown in FIG.

次に、PDLバッファ15aに格納されたPDLコマンドが全て処理されたか判断し(ST20)、PDLバッファ15a内に格納されたPDLコマンドが全て処理されるまで、画像データ形成部(レンダリング部)12による描画データの解析、及び画像データメモリ16aへの展開処理を繰り返す(ST20がNO、ST16〜ST19)。   Next, it is determined whether all the PDL commands stored in the PDL buffer 15a have been processed (ST20), and the image data forming unit (rendering unit) 12 performs processing until all the PDL commands stored in the PDL buffer 15a are processed. The analysis of the drawing data and the expansion process to the image data memory 16a are repeated (ST20 is NO, ST16 to ST19).

その後、PDLバッファ15a内の全てのPDLコマンドの解析処理が完了し、画像データメモリ16aへの描画データの展開が終了すると(ST20がYES)、PDL変換部11(スレッド1)に対して画像形成処理の終了を通知する(ST21)。この通知は、PDL変換部11に供給され、画像形成要求中フラグをオフする(前述の図7に示すフローチャートの処理(ST14、ST15))。   Thereafter, when the analysis processing of all the PDL commands in the PDL buffer 15a is completed and the development of the drawing data in the image data memory 16a is completed (YES in ST20), image formation is performed for the PDL conversion unit 11 (thread 1). The end of the process is notified (ST21). This notification is supplied to the PDL conversion unit 11, and the image forming request flag is turned off (the process of the flowchart shown in FIG. 7 (ST14, ST15)).

その後、上記処理を繰り返し、画像データ形成部(レンダリング部)12は、取り出したPDLコマンドが改頁コマンドである場合(S18がYES)、スレッド数の設定が2より大きいか判断する(ST22)。本例の場合、スレッド数は“3”に設定されており(ST22がYES)、次に圧縮・スプール出力要求中フラグがオンであるか判断する(ST23)。
ここで、圧縮・スプール出力要求中フラグは前述の初期設定において、オフに設定されており(ST23がNO)、上記画像データメモリ16aに展開した画像データを、以後画像データ圧縮部13が読み出しを行う画像データメモリとして設定する(ST24)。
次に、圧縮・スプール出力要求中フラグをオンにセットし(ST25)、画像データ圧縮部13(スレッド3)に対して圧縮・スプール出力要求を出す(ST26)。すなわち、画像データ形成部(レンダリング部)12から画像データ圧縮部13に対して圧縮・スプール出力要求を出力する。
Thereafter, the above processing is repeated, and if the extracted PDL command is a page break command (S18 is YES), the image data forming unit (rendering unit) 12 determines whether the setting of the number of threads is greater than 2 (ST22). In this example, the number of threads is set to “3” (YES in ST22), and it is next determined whether the compression / spool output request flag is on (ST23).
Here, the compression / spool output request flag is set to OFF in the above-described initial setting (NO in ST23), and the image data compression unit 13 reads out the image data developed in the image data memory 16a. The image data memory to be set is set (ST24).
Next, the compression / spool output request flag is set ON (ST25), and a compression / spool output request is issued to the image data compression unit 13 (thread 3) (ST26). In other words, the image data forming unit (rendering unit) 12 outputs a compression / spool output request to the image data compression unit 13.

その後、画像データ形成部(レンダリング部)12は次に画像データを格納する画像データメモリ16a又は16bを設定する。例えば、現在選択されている画像データメモリが16aであれば(ST27がYES)、画像データメモリ16bに変更し(ST28)、現在選択されている画像データメモリが16bであれば(ST27がNO)、画像データメモリ16bに変更する(ST29)。   Thereafter, the image data forming unit (rendering unit) 12 sets the image data memory 16a or 16b for storing image data next. For example, if the currently selected image data memory is 16a (ST27 is YES), it is changed to the image data memory 16b (ST28), and if the currently selected image data memory is 16b (ST27 is NO). The image data memory 16b is changed (ST29).

尚、前述の判断(ST23)において、圧縮・スプール出力要求中フラグがオンの場合には、画像データ圧縮部13及びスプール出力部14による圧縮・スプール出力処理の終了を待ち、圧縮・スプール出力要求中フラグをオフする(ST23がYES、ST30、ST31)。この処理は、後に画像データ圧縮部13及びスプール出力部14が処理を開始し、画像データの圧縮処理及びスプール出力が終了した際行う処理であり、後述する。   If the compression / spool output request flag is ON in the above determination (ST23), the image data compression unit 13 and the spool output unit 14 wait for the compression / spool output processing to end, and then the compression / spool output request is made. The middle flag is turned off (ST23 is YES, ST30, ST31). This process is a process performed when the image data compression unit 13 and the spool output unit 14 start processing later and the image data compression process and the spool output are finished, which will be described later.

次に、スレッド3の処理、即ち画像データ圧縮部13の処理について、図9に示すフローチャートを使用して説明する。先ず、画像データ圧縮部13は、圧縮・スプール出力要求を待ち(ST32)、画像データメモリ16aに展開された画像データの圧縮処理を行う(ST33)。   Next, the processing of the thread 3, that is, the processing of the image data compression unit 13 will be described using the flowchart shown in FIG. First, the image data compression unit 13 waits for a compression / spool output request (ST32), and performs compression processing of the image data expanded in the image data memory 16a (ST33).

次に、上記処理によって圧縮した画像データをスプール出力部14に送り、スプール出力部14はスプーラ17に対して圧縮画像データを出力する。この処理は、図10(a)にcで示す処理である。スプーラ17はLAN等を介してプリンタ装置10に圧縮された画像データを送信する(ST34)。この処理は、図10(a)にdで示す処理であり、プリンタ装置10にて印刷処理が施される。   Next, the image data compressed by the above processing is sent to the spool output unit 14, and the spool output unit 14 outputs the compressed image data to the spooler 17. This process is a process indicated by c in FIG. The spooler 17 transmits the compressed image data to the printer device 10 via a LAN or the like (ST34). This processing is processing indicated by d in FIG. 10A, and printing processing is performed by the printer apparatus 10.

次に、画像データ形成部(レンダリング部)12に対し、圧縮対象画像データの圧縮及びスプール出力処理の終了を通知する(ST35)。この通知は、画像データ形成部(レンダリング部)12に送られ、圧縮・スプール出力要求中フラグをオフする。(前述の図8に示すフローチャートの処理(ST30、ST31))。   Next, the image data forming unit (rendering unit) 12 is notified of the compression of the compression target image data and the end of the spool output process (ST35). This notification is sent to the image data forming unit (rendering unit) 12 and the compression / spool output request flag is turned off. (Processing of the flowchart shown in FIG. 8 (ST30, ST31)).

上記処理は同様に繰り返され、1頁目の文書ファイルはPDL変換部11によってPDLバッファ15a、15bに交互に入力し、画像データ形成部(レンダリング部)12によって交互に読み出され、画像データに変換された後画像データメモリ16aに記憶される。また、次の頁の文書ファイルも、PDLバッファ15a、15bに交互にバッファリングされ、画像データ形成部(レンダリング部)12によって画像データに変換された後画像データメモリ16bに記憶される。画像データ圧縮部13では上記画像データメモリ16a、16bから交互に画像データを読み出し、図10(a)にc、gで示す画像データの圧縮処理を行い、スプール出力部14によって図10(a)にd、fで示すデータ転送処理を行い、スプーラ17を介してプリンタ装置10に画像データを出力する。   The above process is repeated in the same manner, and the document file of the first page is alternately input to the PDL buffers 15a and 15b by the PDL conversion unit 11, and is alternately read by the image data forming unit (rendering unit) 12, and converted into image data. After the conversion, the image data is stored in the image data memory 16a. The document file of the next page is also alternately buffered in the PDL buffers 15a and 15b, converted into image data by the image data forming unit (rendering unit) 12, and stored in the image data memory 16b. The image data compression unit 13 alternately reads out image data from the image data memories 16a and 16b, performs compression processing of image data indicated by c and g in FIG. 10A, and the spool output unit 14 performs FIG. 10A. The data transfer process indicated by d and f is performed, and the image data is output to the printer device 10 via the spooler 17.

その間、スレッド1〜3は、対応する時点で空き状態のコア7a〜7dが選択され、印刷データの処理が順次実行される。(なお図示はしていないが、CPUコアの割当て(CPUコアのディスパッチ)に関しては、Windows(登録商標)などのOSのカーネル部がレディ状態のタスクまたはスレッドに対してCPUコアの割当て(CPUコアのディスパッチ)を行なう。)   In the meantime, for the threads 1 to 3, the idle cores 7a to 7d are selected at the corresponding time points, and the print data processing is sequentially executed. (Although not shown, regarding CPU core allocation (CPU core dispatch), the CPU kernel allocation (CPU core) is assigned to a task or thread in which an OS kernel such as Windows (registered trademark) is ready. Dispatch).)

以上のように、本例によれば3スレッド構成/QuadコアCPU(コア7a〜7d)の場合、図10(a)の如く、PDL変換処理と画像形成(レンダリング)処理と画像圧縮&スプール出力処理の3つの処理およびスプーラによる圧縮画像データの転送処理が並列処理でき、格段の処理時間の短縮できる。尚、図10(b)は同じ文書ファイルを従来のシングルスレッド処理によって処理した例を示し、両処理を比較することによって本例の処理が従来例に比べて高速に行われることが分かる。   As described above, according to this example, in the case of a three-thread configuration / Quad core CPU (cores 7a to 7d), as shown in FIG. 10A, PDL conversion processing, image formation (rendering) processing, image compression & spool output The three processes and the transfer process of the compressed image data by the spooler can be performed in parallel, and the processing time can be significantly reduced. FIG. 10B shows an example in which the same document file is processed by a conventional single thread process. By comparing both processes, it can be seen that the process of this example is performed faster than the conventional example.

また、上記説明では図2に示す4個のコア7a〜7dを有するCPU7の例で説明したが、前述のように4個のCPUを有する構成の図3に示す構成としてもよい。   In the above description, the example of the CPU 7 having the four cores 7a to 7d shown in FIG. 2 has been described. However, as described above, the configuration shown in FIG.

上記例はスレッド数が“3”の場合について説明したが、例えばスレッド数が“2”の場合には、以下の処理となる。すなわち、図8に示すフローチャートの判断(ST22)がNOとなり、スレッド2の処理として、画像データ圧縮部13は画像データメモリ16aに記憶した画像データを読み出し、画像データの圧縮処理を行う(ST36)。さらに、スプール出力部14によって圧縮された画像データはスプーラ17を介してプリンタ装置10に出力される(ST37)。   In the above example, the case where the number of threads is “3” has been described. For example, when the number of threads is “2”, the following processing is performed. That is, the determination of the flowchart shown in FIG. 8 (ST22) is NO, and as the processing of the thread 2, the image data compression unit 13 reads the image data stored in the image data memory 16a and performs the compression processing of the image data (ST36). . Further, the image data compressed by the spool output unit 14 is output to the printer device 10 via the spooler 17 (ST37).

尚、図11は2つのコアを使用した場合のシステム構成例を示し、スレッド数を“2”に設定して本発明の印刷データ処理を行う場合において、適用可能である。
一方、スレッド数が“1”の場合には、以下の処理となる。すなわち、図7に示すフローチャートの判断(ST6)がNOとなり、画像データ形成部(レンダリング部)12はPDLバッファ15に格納されたPDLコマンドを順次取り出し(ST38)、取り出したPDLコマンドが改頁コマンドであるまで、画像データメモリ16aに生成した画像データを書き込む(ST39がYES、ST40、ST41)。
FIG. 11 shows an example of a system configuration when two cores are used, and is applicable when the print data processing of the present invention is performed with the number of threads set to “2”.
On the other hand, when the number of threads is “1”, the following processing is performed. That is, the determination (ST6) in the flowchart shown in FIG. 7 is NO, and the image data forming unit (rendering unit) 12 sequentially extracts the PDL commands stored in the PDL buffer 15 (ST38), and the extracted PDL command is the page break command. Until it is, the generated image data is written in the image data memory 16a (YES in ST39, ST40, ST41).

その後、取り出したPDLコマンドが改頁コマンドであれば(ST39がYES)、画像データ圧縮部13によって画像データメモリ16aに記録された画像データを読み出し、圧縮処理を行い、スプール出力部14によって圧縮された画像データをスプーラ17を介してプリンタ装置10に出力する(ST42、ST43)。
(実施形態2)
Thereafter, if the retrieved PDL command is a page break command (YES in ST39), the image data compression unit 13 reads out the image data recorded in the image data memory 16a, performs compression processing, and is compressed by the spool output unit 14. The obtained image data is output to the printer device 10 via the spooler 17 (ST42, ST43).
(Embodiment 2)

次に、本発明の実施形態2について説明する。尚、以下で説明する実施形態2以降は、前述の実施形態1の処理を前提として、条件を変えてスレッド数の設定を行う際の例を示すものである。   Next, Embodiment 2 of the present invention will be described. In the second and subsequent embodiments described below, examples of setting the number of threads under different conditions are shown on the premise of the processing of the first embodiment.

本例はスレッド数の設定をCPU7のコア数で決定する構成であり、クライアントPCの構成やプリンタドライバの構成等は前述の実施形態1と同様である。以下、図12に示すフローチャートを使用して本例の処理を説明する。   In this example, the setting of the number of threads is determined by the number of cores of the CPU 7, and the configuration of the client PC, the configuration of the printer driver, and the like are the same as those in the first embodiment. Hereinafter, the processing of this example will be described using the flowchart shown in FIG.

この処理は、前述のマルチスレッドの初期化ルーチンである図5の処理(S3)によって呼び出されるルーチンであり、先ずマルチCPUであるCPU7のコア数を獲得する(ステップ(以下、STPで示す)1)。このコア数の情報は、例えばクライアントPC内の基本システムの設定情報から読み出す。   This process is a routine called by the above-described multithread initialization routine (S3) in FIG. 5, and first acquires the number of cores of the CPU 7 that is the multi-CPU (step (hereinafter referred to as STP) 1 ). The information on the number of cores is read from, for example, basic system setting information in the client PC.

次に、スレッド数として初期値“3”をセットする(STP2)。次に、読み出したコア数の情報に基づいて、コア数が2を越えているか、即ち“3”以上であるか判断する(STP3がYES)。ここで、コア数が“3”以上である場合、上記初期設定したスレッド数“3”を設定スレッド数とする(STP3がYES)。   Next, an initial value “3” is set as the number of threads (STP2). Next, based on the read information on the number of cores, it is determined whether the number of cores exceeds 2 (ie, STP3 is YES). Here, when the number of cores is “3” or more, the initially set thread number “3” is set as the set thread number (YES in STP3).

一方、コア数が“2”を越えていない場合、スレッド数を“2”に変更する(STP3がNO、STP4)。さらに、コア数が“1”を越えているか判断し、コア数が“1”を越えていない場合、スレッド数を“1”に設定する(STP5がNO、STP6)。   On the other hand, if the number of cores does not exceed “2”, the number of threads is changed to “2” (STP3 is NO, STP4). Further, it is determined whether the number of cores exceeds “1”. If the number of cores does not exceed “1”, the number of threads is set to “1” (STP5 is NO, STP6).

以上のように、本例はクライアントPCが有するコア数によってスレッド数の設定を行う構成であり、クライアントPCの有するコア数に対応したスレッド数の設定を行うことができ、クライアントPCの性能に合ったスレッド数の設定を自動的に行うことができる。   As described above, this example is a configuration in which the number of threads is set according to the number of cores of the client PC, and the number of threads corresponding to the number of cores of the client PC can be set, which matches the performance of the client PC. The number of threads can be automatically set.

尚、本例においても、複数のコアを有するCPU7の例で説明したが、前述のように複数のCPUを有する構成の図3の例の場合にも同様に適用することができる。
また、クライアントPCのCPUが1個であった場合にも前記同様スレッド数を“1”に設定して、同様の制御を実行する。
(実施形態3)
In this example, the example of the CPU 7 having a plurality of cores has been described. However, the present invention can be similarly applied to the example of FIG. 3 having a plurality of CPUs as described above.
Further, when the number of CPUs of the client PC is one, the number of threads is set to “1” similarly to the above and the same control is executed.
(Embodiment 3)

次に、本発明の実施形態3について説明する。
本例はスレッド数の設定をメモリサイズに従って決定する構成であり、クライアントPCの構成やプリンタドライバの構成等は前述の実施形態1と同様である。以下、図13に示すフローチャートを使用して本例の処理を説明する。
Next, a third embodiment of the present invention will be described.
In this example, the setting of the number of threads is determined according to the memory size, and the configuration of the client PC, the configuration of the printer driver, and the like are the same as those in the first embodiment. Hereinafter, the processing of this example will be described using the flowchart shown in FIG.

本例の処理も、前述のマルチスレッドの初期化ルーチンである図5の処理(S3)によって呼び出されるルーチンであり、先ずメモリサイズの情報を獲得する(ステップ(以下、Wで示す)1)。このメモリサイズの情報も、例えばクライアントPC内の基本システムの設定情報から読み出す。   The processing of this example is also a routine called by the processing (S3) of FIG. 5 which is the above-described multithread initialization routine, and first acquires memory size information (step (hereinafter referred to as W) 1). This memory size information is also read from, for example, basic system setting information in the client PC.

次に、本例においても、スレッド数の初期値として“3”をセットする(W2)。以下、獲得したメモリサイズの情報に従ってスレッド数の設定を行う。すなわち、読み出したメモリサイズが1GBより大きい場合、上記初期設定したスレッド数“3”を維持し、このスレッド数(“3”)に設定する(W3がYES)。   Next, also in this example, “3” is set as the initial value of the number of threads (W2). Hereinafter, the number of threads is set according to the acquired memory size information. That is, when the read memory size is larger than 1 GB, the above-mentioned initially set thread number “3” is maintained and set to this thread number (“3”) (W3 is YES).

一方、メモリサイズが1GBより大きくない場合、スレッド数として“2”の設定を行う(W3がNO、W4)。さらに、メモリサイズが512MBより大きいか判断し(W4)、大きくない場合、スレッド数を“1”に設定する(W5がNO、W6)。   On the other hand, when the memory size is not larger than 1 GB, “2” is set as the number of threads (W3 is NO, W4). Further, it is determined whether the memory size is larger than 512 MB (W4). If not larger, the number of threads is set to “1” (W5 is NO, W6).

以上のように、本例はメモリサイズに対応して最適なスレッド数/画像データメモリ・PDLバッファの設定を行うことができ、メモリサイズを意識することなく、自動的にクライアントPCのメモリサイズに対応したスレッド数の設定を行い、印刷処理を高速化することができる。
(実施形態4)
As described above, in this example, the optimum number of threads / image data memory / PDL buffer can be set corresponding to the memory size, and the memory size of the client PC is automatically set without being conscious of the memory size. The number of threads can be set to speed up the printing process.
(Embodiment 4)

次に、本発明の実施形態4について説明する。
本例はスレッド数の“1”に設定した後、文書ファイル印刷の為にアプリケーション(APL)より指定された解像度及び階調数に従ってスレッド数の設定を行うものである。
以下、図14及び図15に示すフローチャートを使用して本例の処理を説明する。
Next, a fourth embodiment of the present invention will be described.
In this example, after the thread number is set to “1”, the thread number is set in accordance with the resolution and the number of gradations specified by the application (APL) for printing the document file.
Hereinafter, the processing of this example will be described using the flowcharts shown in FIGS. 14 and 15.

先ず、図14に示すフローチャートに従って、スレッド数を“1”に設定する(ステップ(以下、Uで示す)1)。次に、図15に示すフローチャートに従って処理を開始し、先ず前述と同様、供給される文書ファイルに従ってアプリケーションプログラムより依頼された要求を取り出し、対応するPDLコマンドを生成する(U2、U3)。
次に、生成したPDLコマンドを前述と同様、PDLバッファ15にバッファリングし(U4)、生成したPDLコマンドが解像度/階調コマンドであるか判断し(U5)、解像度/階調コマンドでなければ(U5がNO)、改頁コマンドを検出するまで、順次文書ファイルをPDLコマンドに変換する(U6、U7、U2〜U5)。
First, according to the flowchart shown in FIG. 14, the number of threads is set to “1” (step (hereinafter, indicated by U) 1). Next, processing is started according to the flowchart shown in FIG. 15. First, in the same manner as described above, a request requested by the application program is extracted according to the supplied document file, and a corresponding PDL command is generated (U2, U3).
Next, the generated PDL command is buffered in the PDL buffer 15 as described above (U4), and it is determined whether the generated PDL command is a resolution / gradation command (U5). (U5 is NO), the document file is sequentially converted into a PDL command until a page break command is detected (U6, U7, U2-U5).

一方、解像度/階調コマンドを検出すると(U5がYES)、先ず解像度が600dpi以上であるか判断し(U8)、解像度が600dpi以上であれば(U8がYES)、更に階調値が2を越えているか判断する(U9)。ここで、解像度が600dpi以上ではない場合(U8がNO)、又は解像度が600dpi以上であっても階調値が2以下である場合(U9がNO)、スレッド数を“2”に設定する(U10)。   On the other hand, when a resolution / gradation command is detected (U5 is YES), it is first determined whether the resolution is 600 dpi or more (U8). If the resolution is 600 dpi or more (U8 is YES), the gradation value is set to 2. It is determined whether or not it exceeds (U9). Here, if the resolution is not 600 dpi or more (U8 is NO), or if the resolution is 600 dpi or more and the gradation value is 2 or less (U9 is NO), the number of threads is set to “2” ( U10).

次に、解像度が300dpiであるか判断し(U11)、解像度が300dpiであればスレッド数を“3”に設定する(U12)。一方、解像度が300dpiではない場合(U11がNO)、解像度が600dpiであるか判断し(U13)、解像度が600dpiであり、更に階調値が16以上ではない場合(U13がYES、U14がNO)、スレッド数を“3”に設定する(U12)。   Next, it is determined whether the resolution is 300 dpi (U11). If the resolution is 300 dpi, the number of threads is set to “3” (U12). On the other hand, if the resolution is not 300 dpi (U11 is NO), it is determined whether the resolution is 600 dpi (U13). If the resolution is 600 dpi and the gradation value is not 16 or more (U13 is YES, U14 is NO). ), The number of threads is set to “3” (U12).

上記処理によって、スレッド数が“1”乃至“3”に設定された後、前述の処理を実行する。すなわち、実施形態1の処理と同様、画像形成要求中フラグをオフに設定し、圧縮・スプール出力要求中フラグもオフに設定し(U15)、PDLバッファ15bを確保してスレッド2の生成を起動する(U16、U17)。そして、設定されたスレッド数が“2”を越えているか判断し(U18)、スレッド数が“2”を越えていれば(U18がYES)、更に画像データメモリ16bを確保してスレッド3を起動する(U19、U20)。   After the number of threads is set to “1” to “3” by the above processing, the above processing is executed. That is, as in the first embodiment, the image formation request flag is set to OFF, the compression / spool output request flag is also set to OFF (U15), the PDL buffer 15b is secured, and the generation of the thread 2 is started. (U16, U17). Then, it is determined whether the set number of threads exceeds “2” (U18), and if the number of threads exceeds “2” (U18 is YES), the image data memory 16b is further secured and the thread 3 is set. Start (U19, U20).

以下、前述の図7に示すフローチャートと同様の処理を行い、スレッド数“3”が設定された場合には、PDLバッファ15a、15b、及び画像データメモリ16a、16bを交互に使用し、文書ファイルに基づく画像データを効率よくプリンタ装置10に送信できる(U21〜U36)。また、スレッド数“2”が設定された場合には、PDLバッファ15a、15bを交互に使用し、更に画像データメモリ16を使用して、文書ファイルに基づく画像データを効率よくプリンタ装置10に送信する(U21〜U36)。尚、この処理(U21〜U36)は前述の実施形態1と同様の処理であり、説明を省略する。   Thereafter, the same processing as the flowchart shown in FIG. 7 is performed, and when the number of threads “3” is set, the PDL buffers 15a and 15b and the image data memories 16a and 16b are alternately used to generate a document file. Can be efficiently transmitted to the printer 10 (U21 to U36). When the thread number “2” is set, the PDL buffers 15a and 15b are alternately used, and the image data memory 16 is used to efficiently transmit image data based on the document file to the printer apparatus 10. (U21 to U36). Note that this processing (U21 to U36) is the same processing as that in the first embodiment, and the description thereof is omitted.

以上のように、本例は解像度/階調数に対応して最適なスレッド数の設定を行うことができ、自動的にプリンタ装置10の解像度及び階調数に対応した最適なスレッド数の設定を行い、印刷処理を高速化することができる。
(実施形態5)
As described above, in this example, the optimum number of threads can be set according to the resolution / the number of gradations, and the optimum number of threads corresponding to the resolution and the number of gradations of the printer 10 is automatically set. The printing process can be speeded up.
(Embodiment 5)

次に、本発明の実施形態5について説明する。
本例はスレッド数“1”〜“3”について処理時間を計算し、最も平均処理時間が短いスレッド数の設定を行うものである。以下、具体的に説明する。
Next, a fifth embodiment of the present invention will be described.
In this example, the processing time is calculated for the number of threads “1” to “3”, and the number of threads with the shortest average processing time is set. This will be specifically described below.

図16は本例で使用するクライアントPCのシステム構成図である。尚、同図の構成は前述の図2に示すシステム構成と基本的に同様であるが、プリンタドライバ(印刷データ処理装置)1内に時間計測手段20、及び処理時間記憶手段21を含む。尚、他の構成は前述の図2と同様であり、図2と同じ回路には同じ番号を付し、構成上の説明を省略する。   FIG. 16 is a system configuration diagram of the client PC used in this example. 2 is basically the same as the system configuration shown in FIG. 2 described above, but includes a time measuring means 20 and a processing time storage means 21 in the printer driver (print data processing apparatus) 1. Other configurations are the same as those in FIG. 2 described above, and the same circuits as those in FIG.

時間計測手段20は各コア7a〜7dがスレッド処理を実行する際の処理時間を計測する機能を有し、具体的な計測処理については後述する。また、処理時間記憶手段21は、例えば図17に示す処理時間テーブルで構成され、1スレッド構成〜3スレッド構成時の各累積処理時間、累積頁数、及び1頁当たりの平均処理時間を記憶する。以下、本例の処理を具体的に説明する。   The time measuring means 20 has a function of measuring the processing time when each of the cores 7a to 7d executes thread processing, and specific measurement processing will be described later. Further, the processing time storage unit 21 includes, for example, a processing time table shown in FIG. 17, and stores each accumulated processing time, the number of accumulated pages, and an average processing time per page in the 1-thread configuration to the 3-thread configuration. . Hereinafter, the process of this example is demonstrated concretely.

図18は本例の処理を説明するフローチャートであり、先ずスレッド1の処理時間を計測するため、計測処理を開始する(ステップ(以下、Vで示す)1)。具体的には、図19に示す処理に従って実行され、先ずスレッド1の時間計測中フラグがオフであるか判断する(V2)。尚、後述するが、スレッド1〜3の時間計測中フラグは初期時オフに設定されており(V2がYES)、スレッド1の時間計測中フラグをオンにセットし、時間計測手段20(タイマ1)による時間計測を開始する(V3、V4)。   FIG. 18 is a flowchart for explaining the processing of this example. First, in order to measure the processing time of the thread 1, the measurement processing is started (step (hereinafter referred to as V) 1). Specifically, it is executed according to the processing shown in FIG. 19, and it is first determined whether or not the time measuring flag of the thread 1 is off (V2). As will be described later, the time measurement flag for threads 1 to 3 is initially set to OFF (V2 is YES), and the time measurement flag for thread 1 is set to ON to set time measurement means 20 (timer 1 ) Starts time measurement (V3, V4).

その後、図18に示すフローチャートに戻って、PDL変換部11はアプリケーションプログラムより依頼された要求を取り出し、対応するPDLコマンドを生成する(V5、V6)。さらに、生成したPDLコマンドを前述と同様、PDLバッファ15aにバッファリングし(V7)、生成したPDLコマンドが改頁コマンドであるか判断し(V8)、改頁コマンドでなければ(V8がNO)、PDLバッファ15aが満杯になったか判断し(V9)、満杯になるまで上記処理を繰り返す。   Then, returning to the flowchart shown in FIG. 18, the PDL conversion unit 11 takes out a request requested by the application program and generates a corresponding PDL command (V5, V6). Further, the generated PDL command is buffered in the PDL buffer 15a as described above (V7), and it is determined whether the generated PDL command is a page break command (V8). If it is not a page break command (V8 is NO). It is determined whether the PDL buffer 15a is full (V9), and the above processing is repeated until the PDL buffer 15a is full.

改頁コマンドを検出すると(V8がYES)、スレッド数の設定が“3”又は“2”であれば(V10がYES)、スレッド1の処理時間の計測を終了する(V11)。具体的には、図20に示す処理に従って実行され、先ず時間計測手段20(タイマ1)の計測処理を停止し(V12)、タイマ1の値を読み出し(V13)、スレッド1の処理時間として、一時的に記憶し(V14)、タイマ1をリセットする(V15)。そして、スレッド1の時間計測中フラグをオフにする(V15−2)。   When a page break command is detected (V8 is YES), if the setting of the number of threads is “3” or “2” (V10 is YES), measurement of the processing time of the thread 1 is ended (V11). Specifically, the processing is executed according to the processing shown in FIG. 20, and first, the measurement processing of the time measuring means 20 (timer 1) is stopped (V12), the value of timer 1 is read (V13), and the processing time of the thread 1 is Temporarily store (V14) and reset the timer 1 (V15). Then, the time measuring flag of the thread 1 is turned off (V15-2).

次に、改頁コマンドを検出した後(V10、V11)、もしくは、PDLバッファ15aが満杯になった(V9がYES)場合、スレッド数が“2”以上であり(V16がYES)、更に画像形成要求中フラグがオンであるか判断し(V17)、画像形成要求中フラ
グは、初期時オフに設定されており(V17がNO)、上記PDLコマンドを格納したPDLバッファ15aを、以後画像データ形成部(レンダリング部)12が読み出しを行うPDLバッファとして設定する(V18)。
Next, after detecting a page break command (V10, V11) or when the PDL buffer 15a is full (V9 is YES), the number of threads is “2” or more (V16 is YES), and an image It is determined whether the formation request flag is ON (V17). The image formation request flag is initially set to OFF (V17 is NO), and the PDL buffer 15a storing the PDL command is stored in the image data thereafter. The forming unit (rendering unit) 12 is set as a PDL buffer to be read (V18).

次に、前述と同様、画像形成要求中フラグをオンにセットし(V19)、スレッド2に対して画像形成要求を出力し(V20)、その後、PDL変換部11は次に文書ファイルから生成するPDLコマンドを格納するPDLバッファ15a、15bを設定する。すなわち、前述と同様、選択されているPDLバッファが15aであれば(V21がYES)、PDLバッファ15bに変更し(V22)、選択されているPDLバッファが15bであれば(V21がNO)、PDLバッファ15aに変更する(V23)。尚、上記判断(V17)において、画像形成要求中フラグがオンである場合の処理も前述と同様である(V17がYES、V24、V25)。   Next, in the same manner as described above, the image formation request flag is set to ON (V19), and an image formation request is output to the thread 2 (V20). Thereafter, the PDL conversion unit 11 generates from the document file next. PDL buffers 15a and 15b for storing PDL commands are set. That is, as described above, if the selected PDL buffer is 15a (V21 is YES), it is changed to the PDL buffer 15b (V22), and if the selected PDL buffer is 15b (V21 is NO), Change to the PDL buffer 15a (V23). In the determination (V17), the processing when the image formation request flag is on is the same as described above (V17 is YES, V24, V25).

次に、スレッド2の処理、即ち画像データ形成部(レンダリング部)12の処理における時間計測は、図21に示すフローチャートに従って行われる。先ず、PDL変換部11からの画像形成要求を待ち(V26)、画像形成要求があると、スレッド2の処理時間の計測を開始する(V27)。具体的には、図22に示す処理に従って実行され、先ずスレッド2の時間計測中フラグがオフであるか判断する(V28)。前述のように、スレッド1〜3の時間計測中フラグは初期時オフにフラグ設定されており(V28がYES)、スレッド2の時間計測中フラグをオンに設定し、時間計測手段20(タイマ2)による時間計測を開始する(V29、V30)。   Next, the time measurement in the process of the thread 2, that is, the process of the image data forming unit (rendering unit) 12, is performed according to the flowchart shown in FIG. First, an image formation request from the PDL conversion unit 11 is waited (V26), and when there is an image formation request, measurement of the processing time of the thread 2 is started (V27). Specifically, it is executed according to the processing shown in FIG. 22, and it is first determined whether or not the time measuring flag of the thread 2 is off (V28). As described above, the time measurement flag for threads 1 to 3 is initially set to OFF (V28 is YES), the time measurement flag for thread 2 is set to ON, and time measurement means 20 (timer 2 ) Is started (V29, V30).

その後、前述と同様、画像データ形成部(レンダリング部)12に画像形成要求があると、PDLバッファ15aに格納されたPDLコマンドを順次取り出し、取り出したPDLコマンドが改頁コマンドであるか判断し(V31〜V34)、改頁コマンドでない場合、前述と同様、PDLコマンドの解析を行い、画像データを生成して画像データメモリ16aに記憶し、PDLバッファ15aに格納されたPDLコマンドが全て処理されたとき(V34がYES)、PDL変換部11(スレッド1)に対して画像形成処理の終了を通知する(V35)。   After that, as described above, when there is an image formation request in the image data forming unit (rendering unit) 12, the PDL commands stored in the PDL buffer 15a are sequentially retrieved, and it is determined whether the retrieved PDL command is a page break command ( If it is not a page break command, the PDL command is analyzed, the image data is generated and stored in the image data memory 16a, and all the PDL commands stored in the PDL buffer 15a are processed as described above. (V34 is YES), the end of the image forming process is notified to the PDL conversion unit 11 (thread 1) (V35).

また、取り出したPDLコマンドが改頁コマンドである場合(V32がYES)、スレッド数が“2”を越えているか判断し(V36)、スレッド数が“3”の場合(V36がYES)、スレッド2の処理時間の計測を終了する(V37)。具体的には、図23に示す処理に従って実行され、先ず時間計測手段20(タイマ2)による計測処理を停止し(V38)、時間計測手段20(タイマ2)の値を読み出し(V39)、スレッド2の処理時間として、一時的に記憶する(V40)。また、タイマ2の値をリセットし(V41)、スレッド2の時間計測中フラグをオフにする(V41−2)。   If the extracted PDL command is a page break command (V32 is YES), it is determined whether the number of threads exceeds “2” (V36). If the number of threads is “3” (V36 is YES), threads The measurement of the processing time 2 is terminated (V37). Specifically, it is executed in accordance with the processing shown in FIG. 23. First, the measurement processing by the time measuring means 20 (timer 2) is stopped (V38), the value of the time measuring means 20 (timer 2) is read (V39), and the thread The processing time of 2 is temporarily stored (V40). Further, the value of timer 2 is reset (V41), and the time measuring flag of thread 2 is turned off (V41-2).

その後、前述と同様の処理を行い、圧縮・スプール出力要求中フラグがオンであるか判断し(V42)、圧縮・スプール出力要求中フラグがオフに設定されていれば(V42がNO)、上記画像データメモリ16aに展開した画像データを、以後画像データ圧縮部13が読み出しを行う画像データメモリとして設定し(V43)、圧縮・スプール出力要求中フラグ中フラグをオンにセットし(V44)、画像データ圧縮部13に対して圧縮・スプール出力要求を出し(V45)、その後、選択されている画像データメモリが16aであれば(V46がYES)、画像データメモリ16bに変更し(V47)、選択されている画像データメモリが16bであれば(V46がNO)、画像データメモリ16bに変更する(V48)。尚、圧縮・スプール出力要求中フラグがオンである場合の処理も前述と同様である(V49、V50)。   Thereafter, the same processing as described above is performed to determine whether the compression / spool output requesting flag is on (V42). If the compression / spool output requesting flag is set to off (V42 is NO), the above processing is performed. The image data developed in the image data memory 16a is set as an image data memory to be read by the image data compression unit 13 (V43), the compression / spool output request flag flag is set to ON (V44), A compression / spool output request is issued to the data compression unit 13 (V45), and then, if the selected image data memory is 16a (V46 is YES), it is changed to the image data memory 16b (V47) and selected. If the stored image data memory is 16b (V46 is NO), it is changed to the image data memory 16b (V48). The processing when the compression / spool output request flag is ON is the same as described above (V49, V50).

次に、スレッド3の処理時間を計測するため、図24に示すフローチャートに示す処理を実行する。先ず、画像データ圧縮部13は、圧縮・スプール出力要求を待ち(V51)、圧縮・スプール出力要求があると、スレッド3の処理時間の計測を開始する(V52)。具体的には、図25に示す処理に従って実行され、先ずスレッド3の時間計測中フラグがオフであるか判断し(V52−1)、スレッド1〜3の時間計測中フラグは初期時オフにフラグ設定されており(V52−1がYES)、スレッド3の時間計測中フラグをオンに設定し、時間計測手段20(タイマ3)による時間計測を開始する(V52−2、V52−3)。   Next, in order to measure the processing time of the thread 3, the process shown in the flowchart shown in FIG. 24 is executed. First, the image data compression unit 13 waits for a compression / spool output request (V51). When there is a compression / spool output request, it starts measuring the processing time of the thread 3 (V52). Specifically, it is executed in accordance with the processing shown in FIG. 25, and it is first determined whether or not the time measurement flag of the thread 3 is off (V52-1). It is set (V52-1 is YES), the time measurement flag of the thread 3 is set to ON, and time measurement by the time measurement means 20 (timer 3) is started (V52-2, V52-3).

その後、画像データ圧縮部13は、画像データメモリ16bに展開された画像データの圧縮処理を行い(V53)、圧縮処理した画像データをスプーラ17に出力する(V54)。そして、スレッド3の処理時間の計測を終了する(V55)。具体的には、図26に示す処理に従って実行され、先ず時間計測手段20(タイマ3)による計測処理を停止し(V56)、時間計測手段20(タイマ3)の値を読み出し(V57)、スレッド3の処理時間として、一時的に記憶する(V58)。その後、タイマ3をリセットし(V59)、スレッド3の時間計測中フラグをオフにする(V59−2)。   Thereafter, the image data compression unit 13 performs compression processing of the image data expanded in the image data memory 16b (V53), and outputs the compressed image data to the spooler 17 (V54). Then, the measurement of the processing time of the thread 3 is finished (V55). Specifically, the process is executed according to the process shown in FIG. 26. First, the measurement process by the time measurement unit 20 (timer 3) is stopped (V56), the value of the time measurement unit 20 (timer 3) is read (V57), and the thread 3 is temporarily stored as processing time (V58). Thereafter, the timer 3 is reset (V59), and the time measuring flag of the thread 3 is turned off (V59-2).

その後、3スレッド構成の処理時間を更新する(V60)。この処理は、図27に示すフローチャートに従って実行される。先ず、3スレッド構成の累積頁数のデータを+1する(V61)。すなわち、前述の図17に示す3スレッド構成の累積頁数のエリアのデータを+1する。   Thereafter, the processing time of the 3-thread configuration is updated (V60). This process is executed according to the flowchart shown in FIG. First, the data of the cumulative number of pages in the three-thread configuration is incremented by 1 (V61). That is, the data in the area of the cumulative number of pages of the three-thread configuration shown in FIG. 17 is incremented by one.

次に、一時的に記憶しているスレッド1,2,3の処理時間のうち、最も長時間のものを選び、3スレッド構成の累積処理時間に累積する。まず、スレッド2の処理時間がスレッド1の処理時間より長いか判断する(V62)。すなわち、画像データ形成部(レンダリング部)12における処理がPDL変換部11における処理より時間を要したか判断し、スレッド2の処理時間がスレッド1の処理時間より長い場合(V62がYES)、スレッド1の処理時間をスレッド2の処理時間とする(V63)。すなわち、より時間を要した処理の処理時間をスレッド1の処理時間とする。   Next, among the processing times of the threads 1, 2, and 3 temporarily stored, the longest one is selected and accumulated in the accumulated processing time of the three-thread configuration. First, it is determined whether the processing time of the thread 2 is longer than the processing time of the thread 1 (V62). That is, it is determined whether the processing in the image data forming unit (rendering unit) 12 takes more time than the processing in the PDL conversion unit 11, and when the processing time of the thread 2 is longer than the processing time of the thread 1 (V62 is YES) The processing time of 1 is set as the processing time of the thread 2 (V63). That is, the processing time of the process that requires more time is set as the processing time of the thread 1.

次に、スレッド3の処理時間がスレッド1の処理時間より長いか判断する(V64)。この場合、スレッド1の処理時間は上記処理(V63)によって設定された時間であり、この時間とスレッド3の処理時間との比較処理を行う。ここで、スレッド3の処理時間がスレッド1の処理時間より長い場合(V64がYES)、スレッド3の処理時間をスレッド1の処理時間に設定する(V65)。すなわち、スレッド1〜3の各処理に要した時間の中で最も長時間を要したスレッドの処理時間をスレッド1の処理時間に設定する。   Next, it is determined whether the processing time of the thread 3 is longer than the processing time of the thread 1 (V64). In this case, the processing time of the thread 1 is the time set by the above processing (V63), and a comparison process between this time and the processing time of the thread 3 is performed. If the processing time of the thread 3 is longer than the processing time of the thread 1 (V64 is YES), the processing time of the thread 3 is set to the processing time of the thread 1 (V65). That is, the processing time of the thread that took the longest time among the processing times of the threads 1 to 3 is set as the processing time of the thread 1.

次に、3スレッド構成の累積処理時間に、上記スレッド1の処理時間を累積する(V66)。この累積処理時間は、前述の図17に示す3スレッド構成の累積処理時間のエリアに記録される。そして、3スレッド構成の平均処理時間を計算し(3スレッド構成の累積処理時間/3スレッド構成の累積頁数)、図17に示す処理時間テーブルの1頁当たりの平均処理時間のエリアに記録し、処理時間記憶手段21に書き込む(V67、V68)。   Next, the processing time of the thread 1 is accumulated in the cumulative processing time of the three-thread configuration (V66). This cumulative processing time is recorded in the cumulative processing time area of the three-thread configuration shown in FIG. Then, the average processing time of the three-thread configuration is calculated (cumulative processing time of the three-thread configuration / accumulated number of pages of the three-thread configuration), and recorded in the average processing time per page area of the processing time table shown in FIG. Then, it writes in the processing time storage means 21 (V67, V68).

上記例は3スレッド構成の場合について説明したが、例えば2スレッド構成の場合には、以下の処理となる。すなわち、前述の図21に示すフローチャートの判断(V36)がNOとなり、スレッド2の処理として、画像データ圧縮部13は画像データメモリ16に記憶した画像データを読み出し、画像データの圧縮処理を行い(V70)、圧縮した画像データをスプーラ17を介してプリンタ装置10に出力する(V71)。   In the above example, the case of a three-thread configuration has been described. For example, in the case of a two-thread configuration, the following processing is performed. That is, the determination (V36) in the flowchart shown in FIG. 21 is NO, and as the processing of the thread 2, the image data compression unit 13 reads the image data stored in the image data memory 16 and performs the compression processing of the image data ( V70), and output the compressed image data to the printer device 10 via the spooler 17 (V71).

次に、スレッド2の処理時間の計測終了処理を行う(V72)。この処理は前述の図23で説明した処理と同様の処理である。その後、2スレッド構成の処理時間を更新する(V73)。   Next, measurement end processing of the processing time of the thread 2 is performed (V72). This process is the same as the process described with reference to FIG. Thereafter, the processing time of the 2-thread configuration is updated (V73).

この処理は、図27に示すフローチャートに従って実行される。先ず、2スレッド構成の累積頁数のデータを+1し(V74)、スレッド2の処理時間がスレッド1の処理時間より長いか判断する(V75)。この処理も上記処理と同様であり、より時間を要した処理の処理時間をスレッド1の処理時間とする。   This process is executed according to the flowchart shown in FIG. First, the data of the accumulated number of pages in the 2-thread configuration is incremented by 1 (V74), and it is determined whether the processing time of the thread 2 is longer than the processing time of the thread 1 (V75). This process is the same as the above process, and the processing time of the process that requires more time is set as the processing time of the thread 1.

ここで、スレッド2の処理時間がスレッド1の処理時間より長い場合(V75がYES)、スレッド1の処理時間をスレッド2の処理時間に設定する(V76)。次に、2スレッド構成の累積処理時間に上記スレッド1の処理時間を累積し(V77)、2スレッド構成の平均処理時間を計算し(2スレッド構成の累積処理時間/2スレッド構成の累積頁数)、処理時間テーブルの対応するエリアに平均処理時間を記録し、処理時間記憶手段21に書き込む(V78、V79)。   If the processing time of the thread 2 is longer than the processing time of the thread 1 (V75 is YES), the processing time of the thread 1 is set to the processing time of the thread 2 (V76). Next, the processing time of the thread 1 is accumulated in the cumulative processing time of the two-thread configuration (V77), and the average processing time of the two-thread configuration is calculated (the cumulative processing time of the two-thread configuration / 2 the cumulative number of pages of the two-thread configuration) The average processing time is recorded in the corresponding area of the processing time table and written in the processing time storage means 21 (V78, V79).

一方、1スレッド構成の場合には、以下の処理となる。すなわち、図18に示すフローチャートの判断(V16)がNOとなり、画像データ形成部(レンダリング部)12はPDLバッファ15aに格納されたPDLコマンドを順次取り出し(V80)、取り出したPDLコマンドが改頁コマンドであるまで、画像データメモリ16aに生成した画像データを書き込む(V80がYES、V81〜V83)。   On the other hand, in the case of a single thread configuration, the following processing is performed. That is, the determination (V16) in the flowchart shown in FIG. 18 is NO, and the image data forming unit (rendering unit) 12 sequentially extracts the PDL commands stored in the PDL buffer 15a (V80), and the extracted PDL command is the page break command. The generated image data is written in the image data memory 16a until V is (V80 is YES, V81 to V83).

その後、取り出したPDLコマンドが改頁コマンドであれば(V81がYES)、画像データ圧縮部13によって画像データメモリ16aに記録された画像データを読み出し、圧縮処理を行い、スプール出力部14によって圧縮された画像データをスプーラ17を介してプリンタ装置10に出力する(V84、V85)。   Thereafter, if the retrieved PDL command is a page break command (V81 is YES), the image data compression unit 13 reads the image data recorded in the image data memory 16a, performs compression processing, and is compressed by the spool output unit 14. The image data is output to the printer device 10 via the spooler 17 (V84, V85).

次に、スレッド1の処理時間の計測終了処理を行う(V86)。この処理は前述の図20で説明した処理と同様な処理であり、その後1スレッド構成の処理時間の更新処理を行う(V87)。   Next, measurement end processing of the processing time of the thread 1 is performed (V86). This process is the same as the process described with reference to FIG. 20, and thereafter, a process time update process for one thread configuration is performed (V87).

図27は上記処理を説明するフローチャートであり、1スレッド構成の累積頁数のデータを+1し(V88)、1スレッド構成の累積処理時間に計測したスレッド1の処理時間を累積し(V89)、1スレッド構成の平均処理時間を計算し(1スレッド構成の累積処理時間/1スレッド構成の累積頁数)、処理時間テーブルの1スレッド構成の対応するエリアに平均処理時間を記録する(V90、V91)。その後、スレッド1〜3の処理時間を“0”にリセットする(V92)。   FIG. 27 is a flowchart for explaining the above-described processing. The data of the accumulated number of pages of one thread configuration is incremented by 1 (V88), and the processing time of the thread 1 measured in the accumulated processing time of one thread configuration is accumulated (V89). The average processing time of one thread configuration is calculated (cumulative processing time of one thread configuration / accumulated number of pages of one thread configuration), and the average processing time is recorded in the corresponding area of the one thread configuration of the processing time table (V90, V91). ). Thereafter, the processing time of the threads 1 to 3 is reset to “0” (V92).

このようにして、各スレッド構成時の処理時間テーブルを更新していく。そして、次にアプリケーションより印刷要求が発生した場合、プリンタドライバはこの処理時間テーブルを読み出し、1頁あたりの平均処理時間の最も少ないスレッド構成を選択し、そのスレッド数でPDL変換や画像形成処理などを行なう。このスレッド数決定ルーチンを、図28に示すフローチャートに従って説明する。この処理は、前述のマルチスレッドの初期化ルーチンである図5の処理(S3)によって呼び出されるルーチンであり、先ず処理時間記憶手段21から1スレッド構成〜3スレッド構成の1頁当たりの平均処理時間を読み出し、比較する(V93、V94)。
この場合、先ずスレッド数“3”を設定する(V95)。次に、上記平均処理時間を比較した結果、3スレッド構成時の1頁当たりの平均処理時間が最も少ない場合(V96がYES)、上記の設定通りスレッド数として“3”を設定する。
一方、上記判断(V96)がノーである場合、スレッド数を“2”に設定し、2スレッド構成時の1頁当たりの平均処理時間が最も少ないか判断する(V98)。ここで、2スレッド構成時の1頁当たりの平均処理時間が最も少ない場合(V98がYES)、2スレッド構成とする。さらに、上記判断(V98)がノーである場合、スレッド数を“1”に設定し、1スレッド構成の設定を行う(V99)。
In this way, the processing time table for each thread configuration is updated. Next, when a print request is issued from the application, the printer driver reads this processing time table, selects a thread configuration having the shortest average processing time per page, and performs PDL conversion, image formation processing, etc. according to the number of threads. To do. The thread number determination routine will be described with reference to the flowchart shown in FIG. This processing is a routine called by the processing (S3) of FIG. 5 which is the above-described multithread initialization routine. First, the average processing time per page of the 1-thread configuration to 3-thread configuration from the processing time storage means 21. Are read and compared (V93, V94).
In this case, first, the thread number “3” is set (V95). Next, as a result of comparing the above average processing times, when the average processing time per page in the case of three threads is the shortest (V96 is YES), “3” is set as the number of threads as described above.
On the other hand, if the determination (V96) is no, the number of threads is set to “2”, and it is determined whether the average processing time per page in the case of the two-thread configuration is the shortest (V98). Here, when the average processing time per page in the 2-thread configuration is the shortest (V98 is YES), the 2-thread configuration is used. Further, when the determination (V98) is NO, the number of threads is set to “1”, and a one-thread configuration is set (V99).

その後、スレッド1〜3の時間計測中フラグをオフとし、スレッド1〜3の処理時間をゼロにリセットし、時間計測手段20(タイマ1〜3)をリセットする(V100〜V102)   Thereafter, the time measuring flag of threads 1 to 3 is turned off, the processing time of threads 1 to 3 is reset to zero, and the time measuring means 20 (timers 1 to 3) is reset (V100 to V102).

本例は以上のように処理することによって、前述の実施形態2乃至4で説明したCPUの能力や、メモリサイズ、解像度/階調コマンド等を全く意識することなく、自動的に適切なスレッド数の設定を行うことができる。   By processing in this example as described above, an appropriate number of threads can be automatically set without being aware of the CPU capability, memory size, resolution / gradation command, etc. described in the second to fourth embodiments. Can be set.

尚、処理時間記憶手段21に設定する処理時間管理テーブルを用紙サイズに対応した構成としてもよい。図29は用紙サイズ毎にスレッド1〜3の累積処理時間、累積頁数、1頁当たりの平均処理時間を記録し、用紙サイズに従って最適なスレッド構成を選択するための処理時間管理テーブルの例を示す図である。   The processing time management table set in the processing time storage means 21 may be configured to correspond to the paper size. FIG. 29 shows an example of a processing time management table for recording the cumulative processing time, the number of accumulated pages, and the average processing time per page of threads 1 to 3 for each paper size, and selecting an optimal thread configuration according to the paper size. FIG.

上記テーブルに前述の実施形態5の処理に従ってデータを記録し、上記と同様の処理を行うことによって、スレッド構成毎であり、且つ用紙毎に1頁当たりの平均画像形成時間を求め、用紙サイズに応じて最適なスレッド数の設定を行うことができる。   Data is recorded in the table according to the process of the fifth embodiment described above, and the same process as described above is performed to obtain the average image formation time per page for each thread configuration and for each sheet. The optimum number of threads can be set accordingly.

1・・・プリンタドライバ
2・・・ROM
3・・・ディスク装置
4・・・LAN回路
5・・・LCD(液晶ディスプレイ)
6・・・キーボード(KB)
7・・・CPU7
8・・・RAM
10・・プリンタ装置
11・・PDL変換部
12・・画像データ形成部(レンダリング部)
13・・画像データ圧縮部
14・・スプール出力部
15、15a、15b・・PDLバッファ
16、16a、16b・・画像データメモリ
17・・スプーラ
20・・時間計測手段
21・・処理時間記憶手段
1 ... Printer driver 2 ... ROM
3. Disk device 4. LAN circuit 5. LCD (liquid crystal display)
6 ... Keyboard (KB)
7 ... CPU 7
8 ... RAM
10.. Printer device 11.. PDL conversion unit 12.. Image data forming unit (rendering unit)
13. Image data compression unit 14 Spool output units 15, 15a, 15b PDL buffers 16, 16a, 16b Image data memory 17 Spooler 20 Time measuring unit 21 Processing time storage unit

Claims (14)

印刷装置に送信するための印刷データを処理する少なくとも1つ以上の処理手段を備えた印刷データ処理装置であって、A print data processing apparatus comprising at least one processing means for processing print data to be transmitted to a printing apparatus,
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮する画像データ生成手段と、Image data generating means for converting the print data into a PDL command, generating image data from the converted PDL command, and further compressing the image data;
前記圧縮された画像データを前記印刷装置に送信する送信手段と、Transmitting means for transmitting the compressed image data to the printing apparatus;
前記PDLコマンドを記憶するコマンド記憶手段と、Command storage means for storing the PDL command;
前記画像データを記憶する画像データ記憶手段と、Image data storage means for storing the image data;
前記画像データ生成手段を実現する画像データ生成スレッドを少なくとも1つ以上起動させるシステム制御手段と、System control means for activating at least one image data generation thread for realizing the image data generation means;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測する計測手段と、Measuring means for measuring the processing time per page of each of the image data generation threads;
前記処理時間を元に算出される平均処理時間を前記画像データ生成スレッドの数ごとに記録する記憶手段と、Storage means for recording an average processing time calculated based on the processing time for each number of the image data generation threads;
を含み、Including
前記システム制御手段は、前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理装置。The system control means determines the number of the image data generation threads to a number that makes the average processing time the shortest.
印刷装置に送信するための印刷データを処理する少なくとも1つ以上の処理手段を備えた印刷データ処理装置であって、A print data processing apparatus comprising at least one processing means for processing print data to be transmitted to a printing apparatus,
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮する画像データ生成手段と、Image data generating means for converting the print data into a PDL command, generating image data from the converted PDL command, and further compressing the image data;
前記圧縮された画像データを前記印刷装置に送信する手段と、Means for transmitting the compressed image data to the printing device;
前記PDLコマンドを記憶するコマンド記憶手段と、Command storage means for storing the PDL command;
前記画像データを記憶する画像データ記憶手段と、Image data storage means for storing the image data;
前記画像データ生成手段を実現する画像データ生成スレッドを少なくとも1つ以上起動させるシステム制御手段と、System control means for activating at least one image data generation thread for realizing the image data generation means;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測する計測手段と、Measuring means for measuring the processing time per page of each of the image data generation threads;
前記処理時間を元に算出される平均処理時間を用紙サイズごとかつ前記画像データ生成スレッドの数ごとに記録する記憶手段と、Storage means for recording an average processing time calculated based on the processing time for each sheet size and for each number of image data generation threads;
を含み、Including
前記システム制御手段は、前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理装置。The system control means determines the number of the image data generation threads to a number that makes the average processing time the shortest.
請求項1または2に記載の印刷データ処理装置において、The print data processing apparatus according to claim 1 or 2,
前記画像データ生成手段は、The image data generating means
前記印刷データを前記PDLコマンドに変換する第1の画像データ生成手段と、First image data generation means for converting the print data into the PDL command;
前記PDLコマンドから前記画像データを生成する第2の画像データ生成手段と、Second image data generation means for generating the image data from the PDL command;
前記画像データを圧縮し前記送信手段に出力する第3の画像データ生成手段と、Third image data generating means for compressing the image data and outputting the compressed data to the transmitting means;
を含み、Including
前記画像データ生成スレッドは、2つ起動する場合には、When two image data generation threads are activated,
前記第1の画像データ生成手段を実現する第1の画像データ生成スレッドと、A first image data generation thread for realizing the first image data generation means;
前記第2の画像データ生成手段と前記第3の画像データ生成手段とを実現する第2の画像データ生成スレッドと、A second image data generation thread for realizing the second image data generation means and the third image data generation means;
を含み、Including
また、Also, 前記画像データ生成スレッドは、3つ起動する場合には、When three image data generation threads are activated,
前記第1の画像データ生成手段を実現する第1の画像データ生成スレッドと、A first image data generation thread for realizing the first image data generation means;
前記第2の画像データ生成手段を実現する第2の画像データ生成スレッドと、A second image data generation thread for realizing the second image data generation means;
前記第3の画像データ生成手段を実現する第3の画像データ生成スレッドと、A third image data generation thread for realizing the third image data generation means;
を含み、Including
前記第1乃至第2、または、前記第1乃至第3の画像データ生成スレッドは、それぞれ互いに並列に動作可能な異なるスレッドであることを特徴とする印刷データ処理装置。The print data processing apparatus, wherein the first to second or the first to third image data generation threads are different threads that can operate in parallel with each other.
請求項3に記載の印刷データ処理装置において、The print data processing apparatus according to claim 3.
前記コマンド記憶手段は、The command storage means includes
第1のコマンド記憶手段と、First command storage means;
第2のコマンド記憶手段と、を含み、Second command storage means,
前記画像データ生成スレッドが複数起動する場合には、When a plurality of image data generation threads are activated,
前記第1の画像データ生成スレッドが前記PDLコマンドを前記第1のコマンド記憶手段へ出力する期間、前記第2の画像データ生成スレッドは前記PDLコマンドを前記第2のコマンド記憶手段から取得し、During the period when the first image data generation thread outputs the PDL command to the first command storage means, the second image data generation thread acquires the PDL command from the second command storage means,
前記第1の画像データ生成スレッドが前記PDLコマンドを前記第2のコマンド記憶手段へ出力する期間、前記第2の画像データ生成スレッドは前記PDLコマンドを前記第1のコマンド記憶手段から取得することを特徴とする印刷データ処理装置。During the period in which the first image data generation thread outputs the PDL command to the second command storage means, the second image data generation thread acquires the PDL command from the first command storage means. A print data processing apparatus.
請求項4に記載の印刷データ処理装置において、The print data processing apparatus according to claim 4.
前記画像データ生成スレッドが複数起動する場合には、When a plurality of image data generation threads are activated,
前記第1の画像データ生成スレッドは、前記第2の画像データ生成スレッドへ処理を要求するごとに、前記第1のコマンド記憶手段と前記第2のコマンド記憶手段を交互に切り替えて利用することを特徴とする印刷データ処理装置。Each time the first image data generation thread requests the second image data generation thread to perform processing, the first command storage means and the second command storage means are alternately switched and used. A print data processing apparatus.
請求項3乃至5に記載の印刷データ処理装置において、The print data processing apparatus according to claim 3, wherein:
前記画像データ記憶手段は、The image data storage means includes
第1の画像データ記憶手段と、First image data storage means;
第2の画像データ記憶手段と、を含み、Second image data storage means,
前記画像データ生成スレッドが3つ起動する場合には、When three image data generation threads are activated,
前記第2の画像データ生成スレッドが前記画像データを前記第1の画像データ記憶手段へ出力する期間、前記第3の画像データ生成スレッドは前記画像データを前記第2の画像データ記憶手段から取得し、During the period when the second image data generation thread outputs the image data to the first image data storage means, the third image data generation thread acquires the image data from the second image data storage means. ,
前記第2の画像データ生成スレッドが前記画像データを前記第2の画像データ記憶手段へ出力する期間、前記第3の画像データ生成スレッドは前記画像データを前記第1の画像データ記憶手段から取得することを特徴とする印刷データ処理装置。During a period in which the second image data generation thread outputs the image data to the second image data storage unit, the third image data generation thread acquires the image data from the first image data storage unit. A print data processing apparatus.
請求項6に記載の印刷データ処理装置において、The print data processing apparatus according to claim 6.
前記画像データ生成スレッドが3つ起動する場合には、When three image data generation threads are activated,
前記第2の画像データ生成スレッドは、前記第3の画像データ生成スレッドへ処理を要求するごとに、前記第1の画像データ記憶手段と前記第2の画像データ記憶手段を交互に切り替えて利用することを特徴とする印刷データ処理装置。The second image data generation thread alternately uses the first image data storage means and the second image data storage means each time a process is requested to the third image data generation thread. A print data processing apparatus.
請求項1乃至請求項7のいずれか1つに記載の印刷データ処理装置において、The print data processing apparatus according to any one of claims 1 to 7,
前記画像データ生成スレッドの数は、前記ホスト機器が有する処理手段の数に応じて決定することを特徴とする印刷データ処理装置。The number of the image data generation threads is determined according to the number of processing units included in the host device.
請求項1乃至請求項7のいずれか1つに記載の印刷データ処理装置において、The print data processing apparatus according to any one of claims 1 to 7,
前記画像データ生成スレッドの数は、前記印刷データ処理装置が処理に利用するメモリの記憶容量に応じて決定することを特徴とする印刷データ処理装置。The number of image data generation threads is determined according to a storage capacity of a memory used for processing by the print data processing apparatus.
請求項1乃至請求項7のいずれか1つに記載の印刷データ処理装置において、The print data processing apparatus according to any one of claims 1 to 7,
前記画像データ生成スレッドの数は、前記画像データの解像度及び階調数に応じて決定することを特徴とする印刷データ処理装置。The number of image data generation threads is determined according to the resolution and the number of gradations of the image data.
少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを処理する方法であって、A method of processing print data for transmission to a printing apparatus on a host device having processing means having at least one core,
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮し、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信し、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶し、Storing the PDL command;
前記画像データを記憶し、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測し、Measure the processing time per page of each of the image data generation threads,
前記処理時間を元に算出される平均処理時間を前記画像データ生成スレッドの数ごとに記録し、An average processing time calculated based on the processing time is recorded for each number of the image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理方法。A print data processing method, wherein the number of image data generation threads is determined to be a number that minimizes the average processing time.
少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを処理する方法であって、A method of processing print data for transmission to a printing apparatus on a host device having processing means having at least one core,
前記印刷データをPDLコマンドに変換し、変換された前記PDLコマンドから画像データを生成し、更に前記画像データを圧縮し、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信し、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶し、Storing the PDL command;
前記画像データを記憶し、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測し、Measure the processing time per page of each of the image data generation threads,
前記処理時間を元に算出される平均処理時間を用紙サイズごとかつ前記画像データ生成スレッドの数ごとに記録し、The average processing time calculated based on the processing time is recorded for each paper size and for each number of the image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定することを特徴とする印刷データ処理方法。A print data processing method, wherein the number of image data generation threads is determined to be a number that minimizes the average processing time.
少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを前記処理手段に処理させるプログラムであって、A program for causing the processing means to process print data for transmission to a printing apparatus on a host device having processing means having at least one core,
前記処理手段に、In the processing means,
前記印刷データをPDLコマンドに変換させ、変換された前記PDLコマンドから画像データを生成させ、更に前記画像データを圧縮させ、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信させ、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶させ、Storing the PDL command;
前記画像データを記憶させ、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測させ、The processing time per page of each of the image data generation threads is measured,
前記処理時間を元に算出される平均処理時間を前記画像データ生成スレッドの数ごとに記録させ、The average processing time calculated based on the processing time is recorded for each number of the image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定させることを特徴とするプログラム。A program for causing the number of image data generation threads to be determined so as to minimize the average processing time.
少なくとも1つ以上のコアを有する処理手段を備えたホスト機器上で印刷装置に送信するための印刷データを前記処理手段に処理させるプログラムであって、A program for causing the processing means to process print data for transmission to a printing apparatus on a host device having processing means having at least one core,
前記処理手段に、In the processing means,
前記印刷データをPDLコマンドに変換させ、変換された前記PDLコマンドから画像データを生成させ、更に前記画像データを圧縮させ、Converting the print data into a PDL command, generating image data from the converted PDL command, further compressing the image data,
前記圧縮された画像データを前記印刷装置に送信させ、Sending the compressed image data to the printing device;
前記PDLコマンドを記憶させ、Storing the PDL command;
前記画像データを記憶させ、Storing the image data;
前記画像データ生成処理を実現する画像データ生成スレッドを少なくとも1つ以上起動させ、Activating at least one image data generation thread for realizing the image data generation process;
前記画像データ生成スレッドの各々の1頁当りの処理時間を計測させ、The processing time per page of each of the image data generation threads is measured,
前記処理時間を元に算出される平均処理時間を用紙サイズごとかつ前記画像データ生成スレッドの数ごとに記録させ、The average processing time calculated based on the processing time is recorded for each paper size and for each number of image data generation threads,
前記画像データ生成スレッドの数を、前記平均処理時間が最も短くなる数に決定させることを特徴とするプログラム。A program for causing the number of image data generation threads to be determined so as to minimize the average processing time.
JP2013000791A 2013-01-08 2013-01-08 Print data processing method Expired - Fee Related JP5464283B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013000791A JP5464283B2 (en) 2013-01-08 2013-01-08 Print data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013000791A JP5464283B2 (en) 2013-01-08 2013-01-08 Print data processing method

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007286171A Division JP5176488B2 (en) 2007-11-02 2007-11-02 Print data processing method

Publications (2)

Publication Number Publication Date
JP2013080517A JP2013080517A (en) 2013-05-02
JP5464283B2 true JP5464283B2 (en) 2014-04-09

Family

ID=48526782

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013000791A Expired - Fee Related JP5464283B2 (en) 2013-01-08 2013-01-08 Print data processing method

Country Status (1)

Country Link
JP (1) JP5464283B2 (en)

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3553985B2 (en) * 1991-08-06 2004-08-11 株式会社日立製作所 Print control method and print control device
JP3797013B2 (en) * 1999-04-12 2006-07-12 セイコーエプソン株式会社 Image processing method, printing apparatus, image processing system, and recording medium
JP2002120437A (en) * 2000-10-13 2002-04-23 Ricoh Co Ltd Printer
JP2006163672A (en) * 2004-12-06 2006-06-22 Seiko Epson Corp Image processing device and method, and printer
JP4738948B2 (en) * 2005-09-13 2011-08-03 キヤノン株式会社 Information processing apparatus, image processing method, and computer program
JP2007083523A (en) * 2005-09-21 2007-04-05 Fuji Xerox Co Ltd Printer and method for controlling the same
JP4736761B2 (en) * 2005-12-05 2011-07-27 富士ゼロックス株式会社 Printing device

Also Published As

Publication number Publication date
JP2013080517A (en) 2013-05-02

Similar Documents

Publication Publication Date Title
JP5176488B2 (en) Print data processing method
EP1465054B1 (en) Parallel printing system
US8861014B2 (en) Systems and methods for optimized printer throughput in a multi-core environment
US8661209B2 (en) Data processing apparatus, data processing method, and computer-readable recording medium for writing and reading data to and from a storage
JP2008262543A (en) Discontinuous transfer of pdf data for pdf direct printing
JP5226581B2 (en) Method, computer readable medium and computer readable memory for parallel rasterization of display lists
JP3652725B2 (en) Job printing method
JP5097796B2 (en) Image forming apparatus
JPH08224917A (en) Printer and data control method
JPH11203061A (en) Image processor, output device, image processing system and method
JPH10297050A (en) Output controller, output control method, image processor, image processing method, and recording medium
JP5482238B2 (en) Image processing apparatus, image forming apparatus, image processing method, image forming method, and program
JPH11198462A (en) Printer and method for image processing
JP5464283B2 (en) Print data processing method
JP2003330638A (en) Printing system
JP4481041B2 (en) Printing device
JPH05336385A (en) Image processing device
JP3685234B2 (en) Image processing device
US8526052B2 (en) Print data processing apparatus, control method for print data processing apparatus, and storage medium
JPH11157146A (en) Method for processing image of printer and printer
JP2010250393A (en) Information processing apparatus and information processing method
JP5035020B2 (en) Printing device
US9760814B2 (en) Image forming apparatus for processing drawing data described in page description language
JPH07152521A (en) Printing system
JPH1016322A (en) Image formation method and apparatus therefor

Legal Events

Date Code Title Description
TRDD Decision of grant or rejection written
A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20131129

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20131224

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20140106

R150 Certificate of patent or registration of utility model

Ref document number: 5464283

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R360 Written notification for declining of transfer of rights

Free format text: JAPANESE INTERMEDIATE CODE: R360

R371 Transfer withdrawn

Free format text: JAPANESE INTERMEDIATE CODE: R371

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees