Let $r_{i}$ compact objects of an additive category $C$, $i \in I$, where $|I|=\infty$. So,i was wondering if the coproduct of $r_{i}$ is compact object.So,what i want to show is that it commutes with coproducts of arbitrary objects,i.e. $$Hom(\bigoplus_{i\in I}r_{i},\coprod_{j\in J} X_{j})\cong \coprod_{j\in J}Hom(\bigoplus_{i\in I}r_{i},X_{j})$$ What i think is that $$Hom(\bigoplus_{i\in I}r_{i},\coprod_{j\in J} X_{j})\cong \prod_{i\in I}Hom(r_{i},\coprod_{j\in J}X_{j})\cong\prod_{i\in I}\coprod_{j\in J}Hom(r_{i},X_{j}) $$
So,if i show that arbitrary coproduct and product commutes then my assumption will be right.So,am i right?
Note that since we're in an additive category $C$, the commutativity of products and coproducts (of $\text{Hom}$ groups) that you're asking for occurs in the category $\mathsf{Ab}$ of abelian groups, not in $C$.
You're right in the sense that if (counterfactually) arbitrary products and arbitrary coproducts commuted in $\mathsf{Ab}$, then you could use this to show that an arbitrary coproduct of compact objects would be compact in any additive category. But arbitrary products and arbitrary coproducts simply don't commute in $\mathsf{Ab}$.
For example, consider $G_1= \coprod_{j\in \mathbb{N}}\prod_{i\in \mathbb{N}} \mathbb{Z}$ and $G_2 = \prod_{i\in \mathbb{N}}\coprod_{j\in \mathbb{N}} \mathbb{Z}$. Let's write $Z_{ij}$ for the copy of $\mathbb{Z}$ indexed by $i$ and $j$. We can think of the elements of $G_1$ as matrices (with rows indexed by $i$ and columns indexed by $j$) where only finitely many of the columns are non-zero. And we can think of the elements of $G_2$ as matrices (again with rows indexed by $i$ and columns indexed by $j$) where in each row, only finitely many of the entries are non-zero. A matrix in $G_1$ is also in $G_2$, and this identification is the natural map $G_1\to G_2$. But it is not surjective, since the "identity matrix" which is $1\in Z_{kk}$ for all $k$ and $0\in Z_{ij}$ for all $i\neq j$ is in $G_2$ but not $G_1$.
$\mathsf{Ab}$ itself serves as an example of an additive category in which an arbitrary coproduct of compact objects is not compact. For example, $\mathbb{Z}$ is compact, but $\coprod_{n\in \mathbb{N}} \mathbb{Z}$ is not compact. The identity map $\coprod_{n\in \mathbb{N}} \mathbb{Z}\to \coprod_{n\in \mathbb{N}} \mathbb{Z}$ is not in the image of the natural map $$\coprod_{n\in \mathbb{N}} \text{Hom}(\coprod_{n\in \mathbb{N}}\mathbb{Z},\mathbb{Z})\to \text{Hom}(\coprod_{n\in \mathbb{N}} \mathbb{Z},\coprod_{n\in \mathbb{N}} \mathbb{Z}).$$ (Observe that the first group is isomorphic to $G_1$, the second group is isomorphic to $G_2$, and the identity map corresponds to the "identity matrix" described above.)